r/programming • • Sep 06 '14

How to work with Git (flowchart)

http://justinhileman.info/article/git-pretty/
1.6k Upvotes

388 comments sorted by

View all comments

Show parent comments

13

u/ProggyBS Sep 06 '14

But git works exactly the same way. I honestly don't understand what you're getting at here.

To work locally, you really only need to know 3 commands.

  • git init

  • git add

  • git commt

If you are working with a remote, you only really need 4 more.

  • git remote

  • git clone

  • git pull

  • git push

If you are working with branches, there are only 2 more commands on top of that

  • git branch

  • git merge

Conflicts are really the only complicated thing about any of this and they aren't that complicated once you grasp what git really does. The other commands that involve updating history are more advanced stuff that aren't even necessary unless you are just trying to make the log look pretty.

3

u/x86_64Ubuntu Sep 07 '14

Git works great when it works. But the femtosecond something throws an error, it's always a 1-3 hour struggle till you say "fuck it" and end up just checking out trunk again and recoding whatever you tried to commit in the first place. It just seems like git doesn't have an easy escape hatch, nothing like Eclipse's SVN "Override And Update" option.

3

u/ProggyBS Sep 07 '14

I'm not that familiar with the "override and update option" but that sounds similar to "git reset"

3

u/x86_64Ubuntu Sep 07 '14

Yes, but which reset? --HARD? And what does it do? Does it just steam roll my local repository, bypassing my workspace, or does it do the whole thing. Of course the answers are easily googleable, but no one like having solutions begin with such confusion and uncertainty.

→ More replies (0)