From: Neal Kreitzinger <nkreitzinger@gmail.com>
To: Akash <bcakashguru@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git fetch,git merge and git rebase
Date: Thu, 10 Feb 2011 14:00:17 -0600 [thread overview]
Message-ID: <4D5443D1.9000904@gmail.com> (raw)
In-Reply-To: <1297315789338-6010561.post@n2.nabble.com>
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
next prev parent reply other threads:[~2011-02-10 20:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-10 5:29 git fetch,git merge and git rebase Akash
2011-02-10 7:22 ` Alexey Shumkin
2011-02-10 8:22 ` Jonathan Nieder
2011-02-11 6:59 ` Akash
2011-02-10 7:25 ` Alexey Shumkin
2011-02-10 20:00 ` Neal Kreitzinger [this message]
2011-02-10 22:21 ` Neal Kreitzinger
2011-02-10 23:03 ` Jeff King
2011-02-11 7:00 ` Akash
2011-02-11 12:32 ` Felipe Contreras
2011-02-11 17:13 ` Neal Kreitzinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D5443D1.9000904@gmail.com \
--to=nkreitzinger@gmail.com \
--cc=bcakashguru@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).