rebase

What does it mean when git pull causes a conflict but git pull --rebase doesn't?

回眸只為那壹抹淺笑 提交于 2019-12-06 13:55:45
I'm pulling from a repository that only I have access to. As far as I know, I've only pushed to it from one repository. A couple of times, I've tried pushing to it and gotten this: To jbaker@192.168.2.216:tsched_dev.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'jbaker@192.168.2.216:tsched_dev.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details. Generally, that just means that I have to do a git pull

How do I compress multiple merges into a single merge?

霸气de小男生 提交于 2019-12-06 12:47:43
I have a topic branch that looks like this. (the branch topic currently points at 'a0a0') a0a0 Merge branch 'Master' into topic b1b1 Merge Branch 'Master' into topic c2c2 Merge commit 'something from master' into topic d3d3 Merge Branch 'Master' into topic e4e4 Merge Branch 'Master' into topic f5f5 Merge Branch 'Master' into topic 6666 an actual commit [lots of history on the topic branch] 9999 original divergence point How do I turn a0-f5 into a single merge commit? I've tried: git rebase -i f5f5 with the intention of telling it to squash those 5 commits, but instead it just gave every commit

merging changes from master into a published feature branch

寵の児 提交于 2019-12-06 12:25:07
问题 If there are multiple developers working on a feature branch, and we need to periodically bring in changes from master, there are two approaches that I know of: developers communicate that they have the latest changes from the published feature branch. Then one developer rebases onto master and force pushes. Other developers pull down the new feature branch and everyone continues developing. any developer merges master in whenever they like, no one ever force pushes. my questions: am i right

Removing a specific commit in the git history with several branches?

≡放荡痞女 提交于 2019-12-06 11:57:46
I know how to remove a specific commit from the git history with git rebase --interactive . My question concerns the more complex case with a history like this: A--X--B--C--D \ E--F where I would like to remove the commit X . The issue is that in this case there are two or more branches with parents ( B in this case) that have X in their history, so a single git rebase -i will not do the trick (at least I do not know how). Is there a simple way to remove X , or do I have to rely on rebasing all branches on their own, possibly with a shell script? Unfortunately Git doesn't make it easy in this

Resolve git rebase conflicts the same way they were resolved previously

Deadly 提交于 2019-12-06 10:59:22
问题 I've decided to retrospectively commit a history, that was never in Git, from an other old version control system. So I've created an orphan branch "newroot", and imported commits from the other version control system to it. Following question Insert a commit before the root commit in Git? The "newroot" branch ended up with files exactly matching the root commit of the "master" branch. Now I want to rebase the "master" branch onto the "newroot" orphan branch, like: git rebase --onto newroot -

How can two branches be combined into a single branch based on the date of each commit?

二次信任 提交于 2019-12-06 05:52:33
问题 Let's say I have a git repository that looks like this: merge-base---A1--A2------A3------A4 (branchA) \ ----------B1------B2 (branchB) To make things simpler, let's say the commits on branchA are strictly modifications to fileA, and the commits on branchB are strictly modifications to fileB. I want to combine these branches into a third branch, branchAB, where the commits will be ordered by date: merge-base---A1--A2------A3------A4 (branchA) \ ----------B1------B2 (branchB) \ A1--A2--B1--A3-

Reparenting in Mercurial: how does one bring two independent svn clones back together?

自古美人都是妖i 提交于 2019-12-06 00:54:39
问题 Here's the situation: developer Foo created a hg repo from our svn repo. Foo's hg repo was only a shallow clone of the trunk in svn (no svn branches, tags, etc. and the history was incomplete [about 100 changesets]). Developer Bar did the same thing, but cloned the entire svn repo including the entire history, branches, tags, etc. Both Foo and Bar have done branchy development on their repositories. There is a common SVN ancestor to both repositories, but each hg repo has a different version

Git: Show list of commits during interactive rebase

假如想象 提交于 2019-12-05 20:07:26
I'm in the middle of an interactive rebase. Is there a command that shows the list of commits that were initially selected when I started the rebase? During the interactive rebase, git updates files in your .git directory under the sub-directory rebase-merge (the exact path has changed in various versions of git, as I recall; I'm looking at git 2.0.x behavior right now). In that directory are the files done and git-rebase-todo . These are not quite what you asked for: they're the finished parts and the not-yet-done parts, not the "pick" commands that were presented to you initially, nor

Local Git branch has diverged from origin following an interactive rebase

你。 提交于 2019-12-05 18:21:21
I have a local branch ( CRM-ayrshireminis ) that has a couple of commits on it that I have pushed to the origin ( origin/CRM-ayrshireminis ). This branch was created from the develop branch about one week ago, on which there have been one weeks worth of work from other collaborators. What I want to do is rebase the latest code from origin/develop into my feature branch CRM-ayrshireminis . What I done was: git checkout develop git pull git rebase -i develop CRM-ayrshireminis I had two commits, so I squashed them into one and then quit out. I got the message saying Rebasing (2/2) , so it seemed

Rebase a branch without checking it out

可紊 提交于 2019-12-05 17:55:58
问题 So I'm working on a project that sometimes has long build times, and the build is clobbered very often. If I have an older branch with some work going on (which has been committed, but is based on an older parent), running git checkout oldbranch changes the working dir to represent all the old code, which makes me need to run a full build again. However, usually I've only modified one or two files, and the rest don't need to be reset. What I'd like to do is to rebase this branch to the