Re:Git-number: Use numbers for dealing with files in git
by Argorak on Wednesday January 25, 2012 @11:55AM
(#3510483)
Close, but not truly the same. In interactive mode, darcs hands you every change it can find and asks you what to do with it (including reverting the change). So, if i added a file using `touch`, deleted one using `rm` (but not `git rm`), added a debug statement to a file and a change in another, the workflow would be the following:
* Add file foo: Ynr? Y
* Remove file bar: Ynr? n
* Add debug statement? r #revert, I don't need it anyways
* Add change xyz? n # I want this in another commit
Its a real handy way to iterate over _all_ changes in your repos that it finds. I used it heavily to review all my changes before committing them as multiple patches.
Re:Git-number: Use numbers for dealing with files in git
by unwind on Wednesday January 25, 2012 @04:11AM
(#3508993)
I find I just use tab-completion. I'm quite used to writing the names of the files in my project anyway, and find the "hard core" interaction through the shell quite pleasant, it simply is in line with what you tend to do in the shell.
Micro-plug: if you use the Geany editor/IDE, you might like https://github.com/unwind/gitbrowser to make switching between files (opening them if necessary) by substring-searching the filename from the Git repo pleasant.
Re:Git-number: Use numbers for dealing with files in git
by icefox on Wednesday January 25, 2012 @02:56AM
(#3508806)
Neat little tool. For add's though probably 99% of the time I use 'git add -p' Not only do I not have to type the file names, but I get a quick little final code review to boot which seems win all around.
Re:Git-number: Use numbers for dealing with files in git
by famoreira on Wednesday January 25, 2012 @03:42AM
(#3508911)
Interesting and useful if your are using the command line version of git.
However since starting to use Magit (git mode for Emacs) I never feel the need to drop to the console in order to interact with my git repo because Magit has such a brilliant interface. I encourage people to try out!
Re:Git-number: Use numbers for dealing with files in git
by spuz on Wednesday January 25, 2012 @03:13AM
(#3508842)
This is nice but to be honest I'm surprised it's not a feature already built into git. It seems strange that for a command line tool the fastest way to interact with files is to use the mouse to double click and then right click . Maybe you could submit a patch to git itself?
Re:Git-number: Use numbers for dealing with files in git
by jerf on Wednesday January 25, 2012 @11:02AM
(#3510193)
Are you sure you're using your shell with full fluency? I can identify a file in a nontrivial source tree with the shell far faster than a mouse, and the advantage only opens up if I start specifying more than one file.
Re:Git-number: Use numbers for dealing with files in git
by nazri1 on Wednesday January 25, 2012 @03:53AM
(#3508932)
At the beginning I implemented it in git itself, in C, but decided that writing it as a plugin as opposed to as a builtin is better as it is the least intrusive method (read: least amount of work).
Re:Git-number: Use numbers for dealing with files in git
by etherealG on Wednesday January 25, 2012 @04:41AM
(#3509085)
for the logs in detail case, you should check out log's graph command. i find it much quicker than any gui tool at the same thing. here's my alias with color etc:
lg = !git log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative $(git stash list --format=%h)
* Add file foo: Ynr? Y * Remove file bar: Ynr? n * Add debug statement? r #revert, I don't need it anyways * Add change xyz? n # I want this in another commit
Its a real handy way to iterate over _all_ changes in your repos that it finds. I used it heavily to review all my changes before committing them as multiple patches.
Micro-plug: if you use the Geany editor/IDE, you might like https://github.com/unwind/gitbrowser to make switching between files (opening them if necessary) by substring-searching the filename from the Git repo pleasant.
But scm breeze (which I use every days) seems much more powerful.
However since starting to use Magit (git mode for Emacs) I never feel the need to drop to the console in order to interact with my git repo because Magit has such a brilliant interface. I encourage people to try out!
The other GUI case is using qgit when browsing logs in detail.