Reputation: 113
I just started using Git and Github 2 weeks ago, and I wonder if it works the same way clouds do; by pushing to the same branch of the same repository from 2 different locations (2 computer, same files)
Upvotes: 1
Views: 263
Reputation: 856
I generally tend to do a rebase, so that the branch changes are clean
http://gitready.com/advanced/2009/02/11/pull-with-rebase.html
I also have a copy of a cheat on my wall, this helps a lot
http://help.github.com/git-cheat-sheets/
Upvotes: 1
Reputation: 96934
Whoever pushes second will have to do a git pull
first and resolve any merge conflicts that occur before being able to push their changes to the remote repository. This is because they need to know about what others have changed before pushing their own on top of them.
Since you're new to Git, I recommend reading some Git tutorials, as Git is a very complex tool with many commands. It is immensely more frustrating to use if you don't understand how it works.
Upvotes: 2