Tag: branch

Merge parent branch into child branch

I’m using bitbucket and sourcetree and I’ve done this: I have a develop branch. From this branch I have created a feature branch. After creating I have fix some errors on develop branch and push it to this branch only. How can I have these fixes in the feature branch? I think I have to […]

Git rebase branch with merged children

Today I faced with one problem. My teammate created branch from master. He developed one feature in this branch and after that developed two subfeatures in subfeature’s branches. At last he did two refactoring commit of the entire thing. So… C–D E–F | subfeatures / \ / \ B——M1——M2–G–H | feature / A——————-K | master […]

Determining why github says “Closed with unmerged commits”

I sometimes contribute pull requests to an upstream repo. Someone applies my pr to master and closes it. Then github says “Closed with unmerged commits”. Why? What I want to figure out what, if any, code edits I made on the branch that I created the pr from that did not get included (applied or […]

How to step through a git repository?

I am trying to understand a project, it helps to look at its evolution by using gitk. What I do is checkout the first commit, understand code, run tests, go to next commit and repeat. My current workflow is to checkout the commit through its hash git checkout 79cd6 But what I would like is […]

Git create a new branch with only a specified directory and its history then push to new repository

I’d like to create a new branch in my repo that only includes files from a specific directory in master and its history then push that branch to a new repository. …or something equivalent – for instance it may be possible to push a directory to a new repository to a new repo without creating […]

How can I delete all local branches which would result in no changes if merged into master?

I know how to delete all local branches that have been merged. However, and I believe this is due to Github’s new pull request squash and merge feature, I find myself being left with a lot of local branches that are unmerged, but if merged into master would result in no changes. How can I […]

Any gui for git merge (w squash)?

My work flow: branch from master work in my branch, commit frequently (100+) when the job is done in my branch, merge master into my branch, resolve all the conflict. CODE REVIEW TIME before merging back to master For CODE REVIEW, I need to show the differences between two heads and squash/organize my commits ( […]

How do I get a remote tracking branch to stay up to date with remote origin in a bare Git repository?

I am trying to maintain a bare copy of a Git repository and having some issues keeping the remote tracking branches up to date. I create the remote tracking branches like this: git branch -t 0.1 origin/0.1 This seems to do what I need to do for that point in time. However, if I make […]

Use 'pull' or 'merge' to merge local branches?

I have seen two different ways of merging local branches. git checkout master git merge new_feature git checkout master git pull . new_feature What is the difference, pros/cons?

git: rename local branch failed

I don’t know why my attempt of renaming local branch failed. I basically cloned the project, then I also have a submodule within the project, and I downloaded the submodule code as well. However, when I use git branch within the submodule, I have: * (no branch) master The code looks like I’m on another […]

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