On Tue, 05 Apr 2011 12:42:49 +0200
Johannes Müller <dersinndesleb...@gmx.net> wrote:

> I modified my master branch without committing the changes. Now I
> want these changes in a new branch "mod" on the remote site and my
> working copy without changing anything else. The master branch on the
> remote end (github) should stay untouched, since the changes are not
> stable. How can I push my changes to a new (still not existing)
> branch?

One way: "commit on master, push the changes, back master out by one
commit reverting it to a pre-commit state":

$ git commit
$ git push github master:mod
$ git reset --hard HEAD^

Another way: "commit on a fresh throw-away local branch, push the
changes, get rid of the temporary branch":

$ git checkout -b mod
$ git commit
$ git push github mod
$ git checkout master
$ git branch -D mod

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to