git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* How to update from remote origin with local modified branch?
@ 2009-12-02 11:22 GittyUser
  2009-12-02 14:26 ` Michael J Gruber
  0 siblings, 1 reply; 3+ messages in thread
From: GittyUser @ 2009-12-02 11:22 UTC (permalink / raw
  To: git


I have once cloned a a project from a remote repository:
git cloned http://repo.or.cz/r/openbsc.git

After that I modified some files and commited.
In the mean time the remote repository had several commits. Now I want to
update my local repo from the remote repo but I also want to keep my own
commits. So, when doing "git pull" I get the message that certain files
needs to be updated.

Now, how can I get my local repo, with my own modification, updated by the
remote repo?
I know I need to be aware that those updates (or commits) from remote must
not conflict with my local.

Thank you.
-- 
View this message in context: http://n2.nabble.com/How-to-update-from-remote-origin-with-local-modified-branch-tp4099323p4099323.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to update from remote origin with local modified branch?
  2009-12-02 11:22 How to update from remote origin with local modified branch? GittyUser
@ 2009-12-02 14:26 ` Michael J Gruber
  2009-12-02 16:20   ` GittyUser
  0 siblings, 1 reply; 3+ messages in thread
From: Michael J Gruber @ 2009-12-02 14:26 UTC (permalink / raw
  To: GittyUser; +Cc: git

GittyUser venit, vidit, dixit 02.12.2009 12:22:
> 
> I have once cloned a a project from a remote repository:
> git cloned http://repo.or.cz/r/openbsc.git
> 
> After that I modified some files and commited.
> In the mean time the remote repository had several commits. Now I want to
> update my local repo from the remote repo but I also want to keep my own
> commits. So, when doing "git pull" I get the message that certain files
> needs to be updated.
> 
> Now, how can I get my local repo, with my own modification, updated by the
> remote repo?
> I know I need to be aware that those updates (or commits) from remote must
> not conflict with my local.
> 
> Thank you.

I think you want to read up on workflows with git and decide whether you
want to rebase or merge. In short, git fetch --all (which is called by
git pull) will update your remote tracking branches (origin/*), and then
you can decide what to do with your local branch (probably master): Do
you merge origin/master into master, or do you rebase master onto
origin/master?

Michael

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to update from remote origin with local modified branch?
  2009-12-02 14:26 ` Michael J Gruber
@ 2009-12-02 16:20   ` GittyUser
  0 siblings, 0 replies; 3+ messages in thread
From: GittyUser @ 2009-12-02 16:20 UTC (permalink / raw
  To: git



Michael J Gruber-2 wrote:
> 
> 
> I think you want to read up on workflows with git and decide whether you
> want to rebase or merge. In short, git fetch --all (which is called by
> git pull) will update your remote tracking branches (origin/*), and then
> you can decide what to do with your local branch (probably master): Do
> you merge origin/master into master, or do you rebase master onto
> origin/master?
> 

Thnx for your response,

What I want is merge origin/master to local branch master.  My mistake is to
have some uncommited files and I guess that's the reason why it's not,
pardon me, it could not be updated. So I try to commit the files, but still
had issues about unmerged files. So as advised I did "git add -f
unmergedfile" and than they were added to the Index. Did finally the commit
and now get the "Already up-to-date" message after a pull command.

Still need to practice a lot to know what is exactly going on.

-- 
View this message in context: http://n2.nabble.com/How-to-update-from-remote-origin-with-local-modified-branch-tp4099323p4100678.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-02 16:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-02 11:22 How to update from remote origin with local modified branch? GittyUser
2009-12-02 14:26 ` Michael J Gruber
2009-12-02 16:20   ` GittyUser

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).