git-rebase

Cannot pull with rebase

坚强是说给别人听的谎言 提交于 2019-12-09 15:43:23
问题 I get this message: Cannot pull with rebase: You have unstaged changes. Please commit or stash them. Yes, I have changes which are not committed. I searched a way to rebase my uncommitted changes on top of the new code which I would get from a pull. I found this: https://github.com/aanand/git-up I want to know if this is still the way to go, or if there are more modern ways to go. I use git version 1.8.1 回答1: git-up is probably the more sophisticated way to solve this issue. Otherwise, you

GIT Rebase Fatal on Multiple 0.5GB Binary Files

。_饼干妹妹 提交于 2019-12-09 14:50:40
问题 [This question is essentially reopening git crash during rebase which never had an answer] I'm attempting to a rebase from my 'secc' branch as: $ git rebase main First, rewinding head to replay your work on top of it... fatal: Out of memory, malloc failed (tried to allocate 553656577 bytes) # about 0.5 GB $ git rebase --abort No rebase in progress? The failure is related to the fact that both branches and their common ancestor have three .dat files each of which is 0.5 GB. How can I do a

How to rebase only the commits after the latest merge?

隐身守侯 提交于 2019-12-09 13:48:08
问题 Consider following scenario: I checked out a branch from master I made some commits I merged updated master I made some more commits Now I want rebase commits from point 4 so that commits from point 2 are not affected. So if I have initially: (1) (2) x--x--x--x--x--x--x master \ \ y--y--Y--y--y dev (2)(3) (4) I want to get: (1) (2) x--x--x--x--x--x--x master \ \ y--y--------Y'--y'--y' dev (2) (5) (5) If I just do git rebase master it will rebase commits both from 2 and from 4 and delete merge

Why isn't 'git bisect' branch aware?

喜欢而已 提交于 2019-12-09 07:51:44
问题 I'm trying to find the source of a bug that's come up since a commit in the past day on a long lived branch (which will be released much much later) called feature-x . There's a bug though. I find behavior that I don't expect from my script which might have been introduced in any of the commit's up till now, specifically because features of master are used heavily in feature-x, but less so on Master itself. To test this behavior, I have to run my script, dependent.pl. But when bisect jumps

Allow merging unrelated histories in git rebase

♀尐吖头ヾ 提交于 2019-12-09 04:37:04
问题 When you want to rebase a branch keeping merge commits you pass the --preserve-merges flag. When you are merging unrelated history in git you need to pass the --allow-unrelated-histories flag. If you are doing git rebase --preserve-merges when an existing merge comes from an unrelated history, it fails: fatal: refusing to merge unrelated histories If you try git rebase --preserve-merges --allow-unrelated-histories it fails with: error: unknown option 'allow-unrelated-histories' Is there some

Remove commit for good

让人想犯罪 __ 提交于 2019-12-09 01:21:38
问题 I know there are thousands of threads for this question. But I found out something really weird. If you create a project on GitHub, do some commits. Let's say commit 1, 2, 3, 4, 5. Later, you realize you want to change something into commit 3. As you were working in your own branch, no problem to rewrite history. So let's do this: (based on this stackoverflow answer) git rebase --interactive 'bbc643cd^' // Modify 'pick' to 'edit' into interactive prompt and : git commit --all --amend --no

Cherrypicking versus Rebasing

你说的曾经没有我的故事 提交于 2019-12-09 00:13:31
问题 The following is a scenario I commonly face: You have a set of commits on master or design , that I want to put on top of production branch. I tend to create a new branch with the base as production cherry-pick these commits on it and merge it to production Then when I merge master to production, I face merge conflicts because even tho the changes are same, but are registered as a different commit because of cherry-pick. I have found some workarounds to deal with this, all of which are

Reverting an interactive git rebase

不羁的心 提交于 2019-12-08 23:09:22
问题 After completing a feature branch, during a git rebase -i I accidentally removed all my commits. I'm not completely sure but I suspect that instead of squashing my commits, I replaced the entire entry with a commit message. http://shafiulazam.com/gitbook/4_interactive_rebasing.html says: The last useful thing that interactive rebase can do is drop commits for you. If instead of choosing 'pick', 'squash' or 'edit' for the commit line, you simply remove the line, it will remove the commit from

How to properly push one git repository over another on codebasehq?

随声附和 提交于 2019-12-08 19:19:29
I need to know the proper way to move git history from one repository to another on codebasehq.com. Situation: there is a repo on codebasehq.com which I call "old" on path like mycompany.codebasehq.com/projects/OLDNAME/repositories/PROJECTNAME after some development in old repo the team realized that this repo should actually be in different location on codebasehq.com and did "new" repo with just files from "old" repo and push it to mycompany.codebasehq.com/projects/NEWNAME/repositories/PROJECTNAME . So new repo right now has only one (initial) commit with all files from old repo but no old

What is wrong with merge commits?

删除回忆录丶 提交于 2019-12-08 15:53:47
问题 I see a lot of questions where people are asking how that can avoid "pointless" merge commits. What exactly is bad about a merge commit? I find them useful, as you can see exactly where two developers started working, and where there work is merged together. It seems like rebasing, as a lot of answers suggest doing, destroys this information and you lose a lot of the project's history. Is there something I am missing that makes a merge commit undesirable? 回答1: There are two different kind of