git – pulling from specific branch

See the git-pull man page: git pull [options] [<repository> [<refspec>…]] and in the examples section: Merge into the current branch the remote branch next: $ git pull origin next So I imagine you want to do something like: To set it up so that it does this by default while you’re on the dev branch:

How to fully delete a git repository created with init?

Git keeps all of its files in the .git directory. Just remove that one and init again. If you can’t find it, it’s because it is hidden. In Windows 7, you need to go to your folder, click on Organize on the top left, then click on Folder and search options, then click on the View tab and click on the Show hidden … Read more

Make an existing Git branch track a remote branch?

Given a branch foo and a remote upstream: As of Git 1.8.0: Or, if local branch foo is not the current branch: Or, if you like to type longer commands, these are equivalent to the above two: As of Git 1.7.0 (before 1.8.0): Notes: All of the above commands will cause local branch foo to track remote branch foo from remote upstream. The old (1.7.x) … Read more

What does git rev-parse do?

git rev-parse is an ancillary plumbing command primarily used for manipulation. One common usage of git rev-parse is to print the SHA1 hashes given a revision specifier. In addition, it has various options to format this output such as –short for printing a shorter unique SHA1. There are other use cases as well (in scripts and other tools built on top of … Read more

merge one local branch into another local branch

First, checkout to your Branch3: Then merge the Branch1: And if you want the updated commits of Branch1 on Branch2, you are probaly looking for git rebase This will update your Branch2 with the latest updates of Branch1.