Sorry, I'm quite a newbie at Git, and it is hard to find answers for such hard-to-phrase questions (at least for me) on Google.
Say my name is Joe, and I'm working on a software program with my colleague Bob.
We have the upstream Repo A
and we have clones of Repo A
on our local machines, where we code, commit, and push periodically to the same branch, say master. I know this is not technically the best way to do it, but for example's sake.
Now, what happens if we are both working on one file. Bob's local file that he did not yet push has the contents
// awesome program
[some edits by Bob]
My local file that I did not yet push has the contents
// awesome program
[some edits I made]
Bob pushes, a second later I push. What happens now?
Is the file on remote going to be
// awesome program
[some edits I made]
or
// awesome program
[some edits Bob made]
or perhaps, if there is a way to do it, I would like it to be
// awesome program
[some edits Bob made]
[some edits I made]
Sorry for the noobishness :(