Tag: rebase

Git rebase instead of merge, the correct way to do it?

I would like to avoid recurrent branches intersections on my remote repository by using a rebase instead of a merge. To give you a better understanding of what I would like to achieve, please consider the following situation: $ git lg * 2345678 hotfix (HEAD -> master) * 1234567 foo (origin/master, origin/HEAD) $ git push […]

after rebasing on a branch, how to update master to match that rebased branch?

I’ve done a bunch of rebasing on a test GIT branch. The rebasing was done for two reasons: #1: to integrate changes in a parent git-svn trunk; #2: to clean up my local history in preparation for handing off the code to another developer. I have my test branch the way I want it, all […]

Git: Rebase or Merge to update a local branch

Alright, I have a development branch that is tracked remotely and shared by everyone on this project. Locally I have branched off of this to do some ongoing work. However, in the mean time another developer has committed and pushed changes to the development branch that I would like reflected in my local branch. Is […]

Is it possible to easily move all commits from one branch onto another as one commit?

This question already has an answer here: Squash my last X commits together using Git 18 answers

Git pull –rebase when push

I’d like to know if it would be possible with git to auto pull –rebase when doing git push ? I mean if git push is rejected, automatically do a git pull –rebase and then git push again so I don’t need to do that manually each time someone push before me. Thanks for your […]

GIT – Rebase – How to deal with conflicts

I am working on a project that has two branches: master and feature The feature branch was created some time ago and has numerous commits. Since the feature branch was created there have been a couple of commits to master At this point when I go to rebase off of master I get conflicts. I […]

Git Rebase master conflicts

Im having some conflicts on a branch when rebasing master into it. Scenario is: Branch off master, make some changes, commit said changes. Checkout master, make some changes, commit said changes, checkout branch-1. Try to rebase master – conflict.. Now I have other developers working in a similar fashion. Master is kept in sync on […]

Turn two commits with removing and adding files into one commit with file move

I imported SVN repository with Subgit and have problems with git blame. The oldest revision for every source file is from 2014 year, even though the project was started in 2008. This is caused by switching from Ant to Maven (it’s Java project) which changed source directory structure from /src/package/ to /src/main/java/package. With svn log […]

Git – origin/master diverged – throwing away abandoned commit

I’ve been doing my project while at some point I discovered that one thing stopped working. I needed to look up the state of my code when it was working correctly, so I’ve decided to use git checkout (because I wanted to check-something-out). And so I’ve done git checkout SHA Then I’ve done two new […]

rebasing with autosquash doesn't work as expected

I’m trying to squash last 3 commits using autosquash options provided by git–rebase. I have the following history: * commit 78a7e4844fa32d2ef1bb7bd9b44c4a1b9551d31a (HEAD, new) | Author: maxim koretskyi <mkoretskyi@company.com> | Date: Fri Feb 20 10:29:48 2015 +0200 | | squash! s3 | * commit f25491cadc646baf14bd7e951245c6777230a1d7 | Author: maxim koretskyi <mkoretskyi@company.com> | Date: Fri Feb 20 10:29:42 […]

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