Tag: rebase

Warning on executing “git rebase”

I tried to modify the commit message of an old commit using the following command. git rebase -i HEAD~3 After editing the commit list displayed in the text editor (replacing pick with edit), I got the following warning. Warning: the SHA-1 is missing or isn’t a commit in the following line Then when execuing git […]

git – rebase and merge when working on a branch

I have already read a lot but merge and rebase still confuse me. I have 2 branch — Develop and Feature, the Feature branch is branched from one of Develop commits. I use Dx to represent the commit of Develop, and Fx to represent the commit of Feature, where x denotes the number. In the […]

Git Rebase behavior

I know there are many questions about git rebase but I am still having issues with it after two weeks of trying to wrap my head around it. Scenario: Nonprod Branch: New code to push to production Production Branch Production code waiting for an update from non-prod We are getting ready to push nonprod code […]

Git interactive rebase (fixup) preserving original date/time stamps on combined commit

I’d like to clean up a git repo (github hosted) by git rebase and combining like commits into a single one using the ‘fixup’ option. My repo goes back 3 years so I figured I could do this step-wise. For example, my most recent 5 commits are all OK but the 6th-10th needs to be […]

Cannot rebase git, merge and Gerrit

I have done something really weird. And don’t know what to do know. I am working with Gerrit, and it just showed me that it cannot merge because of conflict, but there were any conflict, but instead I guess it was because of detached HEAD And I started to do really random thing, firstly I […]

Why do I have to push a new branch?

Initially, I mistakenly checkout the wrong branch of a project using git. I thought this was an easy fix, but I think I checked out the correct remote branch to new local branch. Oops. Now when I try to push my changes to the remote branch, git says I pushing a new remote branch, which […]

How to use bfg-repo-cleaner after Git rebase on non-bare repo?

Overview I have Git repo which serves as an archive for a number of configs sourced from elsewhere: 200 dirs 100 files per dir 10K plain text per file ~1000 commits per day, usually < 10 lines edited 1 branch 1 user handles all commits all other view repo on read-only basis Before anyone suggest […]

Find all dependency commits in Git

Intro I am using Git to control hotfixes delivered to production. When Development team want to deliver some change to production, they create a bundle of files, called a hotfix, and send to Production team. A hotfix is indicated by its ID such as HF1, HF2, …, HF6. Production team is in charge of reviewing […]

git rebase command broken – mangled output

For some reason git rebase -i <SHA> stopped working for me. I have been using git-rebase to cleanup my feature branches before merges happily for quite some time now, but as of today I only get mangled output in the interactive editor popup… Using an example repository: git clone git@github.com:philsquared/Catch.git cd Catch/ git rebase -i […]

Rebase issue when use GIT Bash

I have a problem when you im using resolve a conflict after push review to Gerrit. These are my steps: # update from remote $ git fetch # get my change from gerrit $ git fetch ssh://hoang.nth@localhost:29418/Git_training_class2 refs/changes/25/325/1 && git checkout FETCH_HEAD # git rebase and problem $ git rebase origin/master You are not currently […]

Git Baby is a git and github fan, let's start git clone.