I need help understandign git pull/fetch merge, etc... I know there are a lot of articles and answers on this site, so I will put it in a context of the problem I have
So, I have this:
Remote branch "myBranch" file A file B Local Branch "myBranch" file A file B
At this point, these 2 branches are the same
2.) I go ahead and manually create an additional file on remote branch. Imitating as if ANOTHER developer commited it So, the picture changes
Remote branch "myBranch"
file A
file B
file C *
Local Branch "myBranch"
file A
file B
Now, I know that git fetch command will "tell me" that there are changes, but will not modify my local branch. When I run git fetch, I get the following output
$ git fetch
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 1), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://bvdevgithubvm.broadviewnet.com/internal-dev/bvn-process-history-service
0c075bc..6098e63 prototype -> origin/prototype
BUT !! I only know that there are differences.
How do I know WHAT CHANGED. Can I see the changes on remote branch BEFORE I bring it to my local branch (to my local machine)
I guess, what I am looking for, is if you know SVN world, something equivalent to being able to see svn log and see who commited what, before doing an SVN update.
This was a part 1 of the question I had. Now goes part 2, that may be viewed as independent question.
3.) So, from above I call git pull and bring the remote modification to the local branch So, the picture now is
Remote branch "myBranch"
file A
file B
file C
Local Branch "myBranch"
file A
file B
file C
At this point branches are the same.
So, I go ahead and delete the file C from my local branch. Then I commit the changes, but DO NOT push them. (yet)!!
At this point the picture is like this:
Remote branch "myBranch"
file A
file B
file C
Local Branch "myBranch"
file A
file B
Now, this is where I get confused. If I do the git fetch or git pull, output is
$ git pull
Already up to date.
I EXPECTED to know that there is something on a remote branch that makes it different. But .. I can't ?
How can I deal with this?
Now, I understand that there may be a reason for such behavior, reason that lies in git filosophy, compared to the SVN (for instance).
But, how I can deal with such a difference? How can I know that things might have changed on the remote?