You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think there is an intuitive way to do the main operations. Now that I think more about it I think a PSProvider would be better suited for managing the Git repositories on your computer, rather than Git operations themselves. For example the Git: drive can be your central point for registering and accessing Git repositories on your computer, or on your GitHub account. I think it can work well with Git cmdlets. For example I can imagine the following scenario:
cd GitHub:PoshCode/PSGit
dir # list files
Get-Commit # list commits
Open-Commit a6eb714 # open commit in GitHub
Git-Clone . C:\GitHub -register
cd Git:\
dir # list registered repos
dir -directory | where { $_.Remote -eq PoshCode/PSGit }
Difference between using the repository from file system vs Git: drive is that when querying files in the Git: drive you will get get-specific properties, such as SHA, LastModifiedBy, LastCommitDate, History, Lines, IsIgnored, RemotePath, etc.
Oh, well in that case, you'll be happy to hear that you don't need a git drive to get stuff like that when you query files ... we can detect you're in a git folder and give you stuff like that on your Get-ChildItem output automatically, without needing to register them.
Activity
Jaykul commentedon Jun 12, 2015
Can you give some more examples of git actions which you can imagine mapping to a provider?
For instance, how would you imagine handling the core 6:
clone
status
add
commit
push
pull
In my head, I immediately thought
git clonewould map toNew-PSDrive... but that already clashes with your example 😉jrich523 commentedon Jun 12, 2015
i had considered this too (once i saw add-item remove-item) but after giving it some thought i realized it wouldnt really work out too well in the end
omidkrad commentedon Jun 12, 2015
I don't think there is an intuitive way to do the main operations. Now that I think more about it I think a PSProvider would be better suited for managing the Git repositories on your computer, rather than Git operations themselves. For example the
Git:drive can be your central point for registering and accessing Git repositories on your computer, or on your GitHub account. I think it can work well with Git cmdlets. For example I can imagine the following scenario:Difference between using the repository from file system vs Git: drive is that when querying files in the Git: drive you will get get-specific properties, such as
SHA,LastModifiedBy,LastCommitDate,History,Lines,IsIgnored,RemotePath, etc.Jaykul commentedon Jun 12, 2015
Oh, well in that case, you'll be happy to hear that you don't need a git drive to get stuff like that when you query files ... we can detect you're in a git folder and give you stuff like that on your
Get-ChildItemoutput automatically, without needing to register them.jrich523 commentedon Jun 12, 2015
yeah, if you look there is a GCI Proxy branch (currently a PR) that shows the change/stage state
omidkrad commentedon Jun 12, 2015
That's great to know. Thank you guys.