rebase

git rebase: copy instead of moving

本秂侑毒 提交于 2019-12-03 09:31:04
My branches are: o---o support.2013.16 \ o---o---o---o---o master \ o---o---o hotfix/A I need to copy hotfix/A to support.2013.16. I'm aware of cherry-picking, but is it possible to do something like git rebase --onto support.2013.16 master hotfix/A but without moving a branch but copying it instead? Git rebase really does copy the original branch to a new one; but because it moves the branch head, it feels like a move rather than a copy. If you used git branch to add an additional branch head to the original branch, you would still have easy access to the original branch after git rebase had

Why does Git remember and use a conflict resolution from an aborted rebase without asking me?

霸气de小男生 提交于 2019-12-03 08:52:11
问题 I did a rebase on my branch foo git rebase master Did some conflict resolutions, then decided I didn't want to do it, and aborted. git rebase --abort All the branch log histories look normal. Now I want to start the same process again. git rebase master When git hits the first conflict that it hit the first time, it lists the files as in conflict just like it did before. BUT instead of marking up the conflict with <<<<< etc, it just shows the file in its state after I resolved the conflict

What git commit practice is better?

空扰寡人 提交于 2019-12-03 07:27:06
I truly believe that to have one commit on one issue is a good practice. I'm sure I read it somewhere in an article like “Best practices”. As such, my workflow has been the following: For a new issue, I create a new local branch with git checkout -b new-issue . Commit all changes into it. Sometimes this involves lots of commits. When done, I squash the commits and rebase them into current thematic branch. If something goes wrong, I can git revert the commit, find the bug, fix it, and commit new patch into the thematic branch. I won't change the remote repository’s history. But today, I was

Why does git svn dcommit lose the history of merge commits for local branches?

ぃ、小莉子 提交于 2019-12-03 07:01:23
问题 I have a local git repository created with git svn clone . I make a local branch, make some changes, switch back to master, git svn rebase and if it's all good, I merge my branch back into master. Then the tree looks something like this: alt text http://img.skitch.com/20090108-cjguu3hcci9x2k17mcftamw8f1.jpg Sometimes, later when I git svn rebase again and get some remote changes, it loses the fact that a_branch was merged into the mainline and the tree looks like this: alt text http://img

GIT Rebase a Branch that is collaborated on?

蹲街弑〆低调 提交于 2019-12-03 06:09:48
After reading this article, it makes sense to rebase to gather changes from the main branch on to my feature branch: Git workflow and rebase vs merge questions clone the remote repo git checkout -b my_new_feature ..work and commit some stuff git rebase master ..work and commit some stuff git rebase master ..finish the feature git checkout master git merge my_new_feature This works great if the feature branch is local to my machine and I can rewrite history as I please. But what if I collaborate with someone else on the feature branch. How do we get the latest changes from the main branch into

Git rebase with renamed files

流过昼夜 提交于 2019-12-03 05:54:41
问题 I've got a branch that renames many files, and I'm trying to rebase it onto master where the original files have been modified (preferably without this devolving into a manual conflict-resolution nightmare). Situation I've been porting a JavaScript project to TypeScript, in my local typescript branch. All of the .js files have now become .ts files, and some of the syntax has been upgraded. Meanwhile, changes to the original .js files have happened on the master branch. I want to rebase my

Git rebase branch with merged children

不羁岁月 提交于 2019-12-03 05:51:06
Today I faced with one problem. My teammate created branch from master. He developed one feature in this branch and after that developed two subfeatures in subfeature's branches. At last he did two refactoring commit of the entire thing. So... C--D E--F | subfeatures / \ / \ B------M1------M2--G--H | feature / A-------------------K | master Usually we rebase feature branches before no-fast-forward merge it into master. But of course this rebase fails. Rebased feature branch became looking like: B'--C'--D'--E'--F'--G'--H' / A--K Of course pointers of C & D became wrong so I also get two

Pull, rebase, push, in one command (or just a few)

依然范特西╮ 提交于 2019-12-03 05:49:30
When using Git, I often find myself doing the following when working in master : # work work work... $ git checkout -b temp $ git commit -a -m 'more work done' $ git checkout master $ git pull origin master # turns out master was updated since my previous pull $ git checkout temp # I don't want a merge commit for a simple bugfix $ git rebase master $ git checkout master $ git merge temp $ git push origin master $ git branch -d temp ... and I get tired of doing this. Is there a way to do this dance without all of the checkouts, and preferably without (manually) creating the temporary branch?

git svn rebase resulted in “byte order is not compatible” error

寵の児 提交于 2019-12-03 05:46:20
问题 Following is the error I am getting when I tried 'git svn rebase': Byte order is not compatible at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 380, at /usr/lib/perl5/5.10/Memoize/Storable.pm line 21 The version of perl I am running is: $ perl --version This is perl, v5.10.1 (*) built for i686-cygwin-thread-multi-64int (with 12 registered patches, see perl -V for more detail) When I searched the web for " Byte order is not compatible " and I get numerous

In Mercurial what's the difference between hg graft and hg rebase

早过忘川 提交于 2019-12-03 05:38:29
问题 I know Rebase is a (bundled) extension, while Graft is a core feature (that replaced the Transplant (bundled) extension). graft is documented as: copy changes from other branches onto the current branch This command uses Mercurial's merge logic to copy individual changes from other branches without merging branches in the history graph. This is sometimes known as 'backporting' or 'cherry-picking'. rebase is documented as: Rebase allows moving commits around in Mercurial's history (using a