From: gmate.amit@gmail.com (Kumar Amit Mehta)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Managing linux-next tree
Date: Thu, 1 Aug 2013 15:33:21 +0530 [thread overview]
Message-ID: <20130801100321.GA4413@gmail.com> (raw)
Hi,
I've been following linux-next tree and base some of my janitorial realted work
on this tree. Things are fine, but I think I'm little confused with the git
branching/merging stuff. Please find some of the steps that I follow to clone
and update my local linux-next tree:
1. Clone the tree (once):
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
So here I've just one branch called master. To work on some code cleanup work
etc, I create my private branch (see step 2 below)
2. Create my private branch based on latest tag(every now and then)
$ git tag -l next-*|tail -n 1
next-20130709
$ git checkout next-20130709
$ git checkout -b July-09
So, Now i have two branches; master and July-09, and I commit any changes in
July-09 branch. Later (say after some days) I fetch remote changes.
3: Fetch remote changes
$ git remote update
Now, I delete the old branch(let's forget about the commits that I made it to
July-09 branch for a moment) and create another private branch by following the
steps mentioned above in step 2. It is fine but when I invoke git command to get
the status of the working tree(say master, remember I've just issued 'git remote
update'), it tells me that my branch and 'origin/master' have diverged. steps,
as in 4:
4: Get the information on working tree status
$ git checkout master # switch back to master
$ git remote update # Fetch remote updates
Fetching origin
remote: Counting objects: 29053, done.
remote: Compressing objects: 100% (4329/4329), done.
.......
.......
>From git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next
* [new tag] v3.11-rc3 -> v3.11-rc3
$ git branch -D July-09 # deleting the old branch
$ git branch # Left with master now
* master
$ git checkout next-20130801 -b Aug-01 # Creating once again a new branch
$ git branch
* Aug-01 <--- Currently on Aug-01
master
$ git status
# On branch Aug-01
nothing to commit (working directory clean)
$ git checkout master # Switch back to master once again
$ git branch
Aug-01
* master <--- Currently on master
$ git status # get the working tree status
# On branch master
# Your branch and 'origin/master' have diverged, <-------------------+
# and have 368 and 3227 different commit(s) each, respectively. <----+
#
nothing to commit (working directory clean)
So, What should I do to keep my local master in sync with the remote
origin/master ? Will a 'git pull' work ? Actually I tried 'git pull', but it
gave me some warning messages, hence I interrupted(CTRL-c) this in between
<snip>
$ git pull
warning: too many files (created: 926 deleted: 310), skipping inexact rename
detection
warning: too many files (created: 4620 deleted: 3979), skipping inexact rename
detection
warning: too many files (created: 1256 deleted: 405), skipping inexact rename
detection
</snip>
!!amit
next reply other threads:[~2013-08-01 10:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 10:03 Kumar Amit Mehta [this message]
2013-08-01 12:42 ` Managing linux-next tree Valdis.Kletnieks at vt.edu
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=20130801100321.GA4413@gmail.com \
--to=gmate.amit@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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).