Re: git fetch,git merge and git rebase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/9/2011 11:29 PM, Akash wrote:

Hi,

I am new to git .Can someone explain in simple terms what git fetch,git
merge and git rebase do?..I tried googling but was very confused after going
thro it.

Also, can someone prescribe a link which explains git in detail right from
scratch.


git fetch: retrieve the latest version of a branch and store it in the /remotes/* "remote tracking branches" of your local repo. you can view these branches with "git branch -a". Once you have that local copy, you can merge it into other branches, checkout objects from it, and run diffs against it. You are not supposed to EVER make commits on a remote/* branch. its sole purpose in life is to maintain an image the the corresponding branchs that its tracking in the remote repo. you update that image by performing git fetch. see man-page for details.

git merge: merges branch(s) into your current branch. see man-page for details. lots and lots of details...

git rebase: takes all the local commits you've made on an old history and rewrites them on-top of the new history. it makes it look like you did your work based on the new history instead of the old history. it keeps your history 'linear' instead of having all these merge DAG's in your history like git-merge produces. see man page for details. lots and lots of details are not easy to understand at first...

hope this helps.

v/r,
neal
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]