Tag: rebase

what git log shows me didn't match what git rebase -i head~3 shows me

I’m having problems with rebase. I want to squash some builds, but I can´t. This is what I get when I execute the command git log –oneline: git log –oneline 2e6d3cf Fix bug fetching data 4abe96e conflicts merged 34d130d latam_schedule with geotargeted languaje and data fetching 8687f73 removes extra lines, and add the includes I […]

Git won't let me rebase (untracked files would be overwritten). What should I do?

I just want to edit/amend the text of an older Git commit. I ran the following: $ git rebase -i a41a407d6f53328d49267e6a8429b9492f023629 error: The following untracked working tree files would be overwritten by checkout: admin/roles/allowassign.php admin/roles/allowoverride.php admin/roles/assign.html admin/roles/assign.php admin/roles/manage.html admin/roles/manage.php admin/roles/managetabs.php admin/roles/override.html admin/roles/override.php Aborting could not detach HEAD However, git status does not list any untracked […]

interactive git rebase failed with “git-rebase-todo: No such file or directory”

when I do interactive git–rebase: git rebase -i HEAD~2 it shows: C:\GnuWin32\bin\grep.exe: /cygdrive/xxx/.git/rebase-merge/git-rebase-todo: No such file or directory Nothing to do (xxx is the project path) but git rebase branch_xxx is working. I am sure no rebase is in progress previous(checking with git rebase –abort and use clean project folder both) have some one solved […]

Pull requests merged manually after a rebase don't show as merged on Github

In order to keep a linear history, I use the following approach to merge changes instead of relying on github‘s merge functionality: git checkout -b feature_x user/feature_x git rebase master git checkout master git merge –no-ff feature_x git push origin master # On Github: PR gets merged and closed git branch -D feature_x The above […]

How is “author” determined for a git commit when rebasing and squashing?

I rebased a coworkers branch that had 2 commits and squashed the second commit into the first one. It preserved the original author (i.e. not me). Suppose I want to fix one line of code, so I reverse a hunk and make a new commit. At this point, I’m back where I started, with two […]

Git rebase noise

that is maybe a silly question (for sure) but for everything that I have read / found none matches what I want to do… and that is a GIT basic situation. To make my situation more simple I have two branches : – master (main branch) – feature (created from master) I work on my […]

In git, editing a historical pre-pull commit after the pull causes divergence from origin

In the following scenario: Make commits A, B, C Pull, getting commits D, E Make more commits F, G, H, … Realize that you need to tweak B Tweak B using git rebase -i and git commit –amend Now git status says: Your branch and ‘origin/master’ have diverged. How should I fix this? Note: I […]

Git Squash sequential commits by an author to compress history

My team was working on a long running feature branch which has hundreds of commits now and now i need to merge it into master for production release. I do not want to have that many commits in that branch since many commits were done for doing bug fixes and are changing only couple of […]

In what case might a rebase to HEAD~10 produce conflicts?

I have a case where just doing git rebase HEAD~10 produces multiple merge conflicts. As I understand it the command above should revert to HEAD~10 and then cherry-pick every commit since then over it without any changes, thus simply repeating history. How is it possible for this to produce merge conflicts? I will not post […]

Git rebase tries to apply changes to wrong file

I have a problem understanding what goes wrong in the following scenario: I have a feature branch X that is behind on development, so I do a rebase of this feature branch by calling git rebase development when the HEAD is on this feature branch X. Git now replays all commits of my feature branch […]

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