login
Header Space

 
 

Re: git pull/merge master on other branch

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Kevin Ballard <kevin@...>
Cc: Johan Herland <johan@...>, SungHyun Nam <goweol@...>, <git@...>
Date: Tuesday, May 13, 2008 - 1:24 pm

Kevin Ballard wrote:

I recommend against using update-ref...

and instead suggest using fetch to do all of the work.
Some variation of:

    git fetch origin master:master

This will only fast-forward the master branch based on the remote origin's
master branch. update-ref will blindly overwrite the master ref, if you make
a mistake and its not a fast-forward, you just lost some commits.

The above doesn't update your remotes though, maybe the following would be
correct, but I haven't tried it.

   git fetch origin && git fetch . remotes/origin/master:master



Also, I'm surprised no one mentioned the git-new-workdir script in the
contrib directory. It allows you to have multiple work directories
which share and update a single repository.

You could

    git-new-workdir <path_to_repo> <path_to_newworkdir> master
    cd <path_to_newworkdir>
    git pull

-brandon
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git pull/merge master on other branch, SungHyun Nam, (Fri May 9, 1:26 am)
Re: git pull/merge master on other branch, Kelvie Wong, (Mon May 12, 11:12 pm)
Re: git pull/merge master on other branch, Johan Herland, (Fri May 9, 2:24 am)
Re: git pull/merge master on other branch, Kevin Ballard, (Fri May 9, 1:16 pm)
Re: git pull/merge master on other branch, Brandon Casey, (Tue May 13, 1:24 pm)
Re: git pull/merge master on other branch, SungHyun Nam, (Mon May 12, 10:22 pm)
Re: git pull/merge master on other branch, Lars Hjemli, (Tue May 13, 12:08 pm)
Re: git pull/merge master on other branch, SungHyun Nam, (Fri May 9, 4:28 am)
Re: git pull/merge master on other branch, Johan Herland, (Fri May 9, 5:06 am)
speck-geostationary