Category: Branch Management

How to merge only specific files from another commit or branch 0

How to merge only specific files from another commit or branch

When you are working on some feature, it is not unlikely for you realize that not all the work done in another branch is now relevant except for the changes done to a few...

Local branch, remote tracking branch and remote branches in git 0

Local branch, remote tracking branch and remote branches in git

I just put together a simple visual model for the different kinds of branches it git. You are likely to find this information the most useful when you are dealing with git pull and...

How to delete a branch on a remote repository 0

How to delete a branch on a remote repository

I often found myself working on local feature branches that I pushed to remotes just so that there is always a backup of my source code in another location. Such feature branches that nobody...

How to clone just a single branch from a remote 0

How to clone just a single branch from a remote

If you have ever felt a need to keep a copy of different branches in different directories, you probably want to clone only the branch you want a copy of. This simple git command...

Get a remote branch into your freshly cloned local repository 0

Get a remote branch into your freshly cloned local repository

If you have just cloned a repository, by default git places you on the master branch. Even if you do a ‘git branch’ it just shows you the master branch because that is all...