tagged [git-branch]

Rename master branch for both local and remote Git repositories

Rename master branch for both local and remote Git repositories I have the branch `master` which tracks the remote branch `origin/master`. I want to rename them to `master-old` both locally and on the...

17 Apr at 18:24

Cleaning up old remote git branches

Cleaning up old remote git branches I work from two different computers (A and B) and store a common git remote in the dropbox directory. Let's say I have two branches, master and devel. Both are trac...

14 Apr at 11:32

Find out which remote branch a local branch is tracking

Find out which remote branch a local branch is tracking > [How can I see which Git branches are tracking which remote / upstream branch?](https://stackoverflow.com/questions/4950725) How can I find ...

16 Mar at 00:55

How to commit my current changes to a different branch in Git

How to commit my current changes to a different branch in Git Sometimes it happens that I make some changes in my working directory, and I realize that these changes should be committed in a branch di...

4 Dec at 13:5

Push commits to another branch

Push commits to another branch Is it possible to commit and push changes from one branch to another. Assume I commited changes in and want to push them to . From , is it valid to do: And then reset BR...

7 Jul at 12:29

What are the differences between git branch, fork, fetch, merge, rebase and clone?

What are the differences between git branch, fork, fetch, merge, rebase and clone? I want to understand the difference between a branch, a fork and a clone in Git? Similarly, what does it mean when I ...

25 Apr at 15:17

Create Git branch with current changes

Create Git branch with current changes I started working on my branch thinking that my task would be easy. After a while I realized it would take more work and I want to do all this work in a new bran...

11 Apr at 11:40

How do I merge my local uncommitted changes into another Git branch?

How do I merge my local uncommitted changes into another Git branch? How can I do the following in Git? My current branch is branch1 and I have made some local changes. However, I now realize that I a...

11 Apr at 00:41

Renaming branches remotely in Git

Renaming branches remotely in Git If there is a repository that I only have `git://` access to (and would usually just push+pull), is there a way to rename branches in that repository in the same way ...

23 Mar at 11:31

How to download a branch with git?

How to download a branch with git? I have a project hosted on GitHub. I created a branch on one computer, then pushed my changes to GitHub with: Now I am on a different computer, and I want to downloa...

14 Feb at 16:34

How to pull remote branch from somebody else's repo

How to pull remote branch from somebody else's repo I've got a project hosted on GitHub which somebody has forked. On their fork, they've created a new branch "foo" and made some changes. How do I pul...

How to replace master branch in Git, entirely, from another branch?

How to replace master branch in Git, entirely, from another branch? I have two branches in my Git repository: 1. master 2. seotweaks (created originally from master) I created `seotweaks` with the int...

19 Aug at 18:8

Remove tracking branches no longer on remote

Remove tracking branches no longer on remote Is there a simple way to delete all tracking branches whose remote equivalent no longer exists? Example: Branches (local and remote) - - - - - Locally, I o...

13 Aug at 13:38

How do I create a new Git branch from an old commit?

How do I create a new Git branch from an old commit? > [Branch from a previous commit using Git](http://stackoverflow.com/questions/2816715/branch-from-a-previous-commit-using-git) I have a Git bran...

24 Jan at 22:18

Move existing, uncommitted work to a new branch in Git

Move existing, uncommitted work to a new branch in Git I started some work on a new feature and after coding for a bit, I decided this feature should be on its own branch. How do I move the existing u...

9 Oct at 05:1

How to get the changes on a branch in Git

How to get the changes on a branch in Git What is the best way to get a log of commits on a branch since the time it was branched from the current branch? My solution so far is: The documentation for ...

24 Jul at 11:40

How do I run git log to see changes only for a specific branch?

How do I run git log to see changes only for a specific branch? I have a local branch tracking the remote/master branch. After running `git-pull` and `git-log`, the log will show all commits in the re...

24 Jul at 11:34

Move branch pointer to different commit without checkout

Move branch pointer to different commit without checkout To move the branch pointer of a checked out branch, one can use the `git reset --hard` command. But how to move the branch pointer of a not-che...

13 Jun at 10:48

How can I diff two branches in GitHub?

How can I diff two branches in GitHub? I am just wondering if there is a way to simply diff two branches in GitHub? I know GitHub has capacity to do it because when we do code-reviews it does list out...

21 Apr at 21:26

Git: "Not currently on any branch." Is there an easy way to get back on a branch, while keeping the changes?

Git: "Not currently on any branch." Is there an easy way to get back on a branch, while keeping the changes? So I've done some work in the repository and when I'm about to commit I realize that I'm no...

22 Feb at 16:47

Your configuration specifies to merge with the <branch name> from the remote, but no such ref was fetched.?

Your configuration specifies to merge with the from the remote, but no such ref was fetched.? I am getting this error for pull: > Your configuration specifies to merge with the ref 'refs/heads/featur...

How do I commit only some files?

How do I commit only some files? I have two projects. One is the "official" project and the second is a light modification (some files added). I created new branch and I put new files to them. But in ...

5 Apr at 19:43

How do I push a local Git branch to master branch in the remote?

How do I push a local Git branch to master branch in the remote? I have a branch called develop in my local repo, and I want to make sure that when I push it to origin it's merged with the origin/mast...

26 Feb at 12:53

Default behavior of "git push" without a branch specified

Default behavior of "git push" without a branch specified I use the following command to push to my remote branch: If I say does that push changes in my other branches too, or does it only update my c...

24 Jun at 04:40

How to create the branch from specific commit in different branch

How to create the branch from specific commit in different branch I have made several commits in the master branch and then merged them to dev branch. I want to create a branch from a specific commit ...

25 Jan at 00:1