News for hackers. Stuff that matters.
Re:Ten Years of Git: An Interview with Linus Torvalds by plongeur on Monday April 06, 2015 @02:57PM (#9329971)
99% of the time I use:

- git status

- git add ...

- git reset ...

- git commit ...

- git log ...

- git push/pull ...

I guess that's "the basics" - what command should I learn next?

Re:Ten Years of Git: An Interview with Linus Torvalds by mbell on Monday April 06, 2015 @03:46PM (#9330286)
Command to learn: - git rebase (if you learn everything you can do with this command, you'll pretty much know git inside and out)

Other useful stuff: - git diff - git diff --cached - git log --graph --decorate --pretty=oneline --abbrev-commit --all - git cherry-pick - git stash

Re:Ten Years of Git: An Interview with Linus Torvalds by joe_inferno on Monday April 06, 2015 @04:05PM (#9330401)
git bisect is a powerful one i use to identify when a given bug was introduced
Re:Ten Years of Git: An Interview with Linus Torvalds by icefox on Monday April 06, 2015 @05:12PM (#9330729)
Install git achievements (https://github.com/icefox/git-achievements) and get free internet points to expore them all.

Disclaimer: wrote this a few years ago and it has way more users than I ever would have thought.

Re:Ten Years of Git: An Interview with Linus Torvalds by abvdasker on Monday April 06, 2015 @04:45PM (#9330599)
I use this command constantly:

http://blog.kfish.org/2010/04/git-lola.html

Being able to see the graph structure made it far easier for me to get a grasp git's general structure and flow on a higher level.

Re:Ten Years of Git: An Interview with Linus Torvalds by Aga on Monday April 06, 2015 @06:15PM (#9331012)
Looking at the history tree with all the branches and remote branches is a great way really understand Git.

More powerful history browsers to "lola": * gitk (graphical, developed in git's own repo) https://lostechies.com/joshuaflanagan/2010/09/03/use-gitk-to... * tig (console) http://jonas.nitro.dk/tig/manual.html

Re:Ten Years of Git: An Interview with Linus Torvalds by naggie on Monday April 06, 2015 @03:14PM (#9330087)
> git rebase -i Very useful!
Re:Ten Years of Git: An Interview with Linus Torvalds by qzw on Monday April 06, 2015 @03:23PM (#9330151)
Yes, but watch out if you've already pushed to remote branches or even done merge/rebase with other local branches. You're rewriting history.
Re:Ten Years of Git: An Interview with Linus Torvalds by Zikes on Monday April 06, 2015 @04:04PM (#9330389)
I most often use it because I forgot to include a certain file in my most recent commit. I'll just commit that file then rebase -i to merge the two.
Re:Ten Years of Git: An Interview with Linus Torvalds by regularjack on Monday April 06, 2015 @05:09PM (#9330708)
If you want to alter the most recent commit, you can 'git commit --amend', no need to rebase.

http://git-scm.com/book/en/v2/Git-Basics-Undoing-Things

Re:Ten Years of Git: An Interview with Linus Torvalds by lentil on Monday April 06, 2015 @05:11PM (#9330724)
For quick changes to the most recent commit, a handy alias to put in your ~/.gitconfig is:

  fixup = commit --amend -C HEAD
That way you can stage whatever you forgot, and then do `git fixup` to update the latest commit with it. Saves a little bit of typing :)

I do love `rebase -i` for anything more complicated though.

Re:Ten Years of Git: An Interview with Linus Torvalds by fennecfoxen on Monday April 06, 2015 @03:33PM (#9330213)
that flows naturally into git reflog -- to get you out of a botched rebase with git reset :P
Re:Ten Years of Git: An Interview with Linus Torvalds by rileymat on Monday April 06, 2015 @07:37PM (#9331298)
bisect.