0

I've got several questions about the latest function GitHub nested in VS2013 ( I didn't install any other 3-rd party Git tools).

If I fork a project in the GitHub website as a server side, and I clone the project into my local disc and do editing, deleting , adding files……, then:

1) If I "commit" all the changes, will these changes impact my forked project on the server side?

2) If I then "Push" all the changes after commit, will these changes impact my forked project on the server side?

3) If I then "Push" all the changes after commit, will this also send a pull request to the original project where I forked so that the original author knows I've sent some changes and maybe he/she can do merges?

4) If I click "Pull", and if the original has some changes (differing from mine), will my fork project be synchronized with the latest version from the original one?

5) If I click "Fetch", what will happen? what's the most difference between "Fetch" and "Pull" in VS2013?

Yeldar Kurmangaliyev
  • 33,467
  • 12
  • 59
  • 101
xqMogvKW
  • 628
  • 7
  • 17

1 Answers1

0

1) If I "commit" all the changes, will these changes impact my forked project on the server side?

No, when you do a commit locally this affects the local branch, not the remote one.

2) If I then "Push" all the changes after commit, will these changes impact my forked project on the server side?

Yes, pushing your branch is how you "sync" the local and remote versions.

3) If I then "Push" all the changes after commit, will this also send a pull request to the original project where I forked so that the original author knows I've sent some changes and maybe he/she can do merges?

Yes, my recollection is GitHub will do this.

4) If I click "Pull", and if the original has some changes (differing from mine), will my fork project be synchronized with the latest version from the original one?

What happens depends on your pull strategy. You could trigger a merge or a rebase. This will depend on your settings. In either case, yes you will "sync" with the remote branch.

5) If I click "Fetch", what will happen? what's the most difference between "Fetch" and "Pull" in VS2013?

Doing a fetch will tell Git to bring in the changes from the remote to your local Git system but it will not merge or rebase the changes in to any branch. Here is a simple equation for you to remember:

git pull = git fetch + git merge/rebase
Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360