tagged [git]

Update Git branches from master

Update Git branches from master I have four branches (master, b1, b2, and b3). After I worked on b1-b3, I realized I have something to change on branch master that should be in all other branches. I c...

28 Dec at 23:48

How to get Git to clone into current directory

How to get Git to clone into current directory I'm doing: I'm getting: > Fatal: destination path '.' already exists and is not an empty directory. I know path . already exists. And I can assure that ...

25 Mar at 22:39

Commit history on remote repository

Commit history on remote repository I am trying to access a branch's commit history on a remote repository. I had a look at [the doc](http://git-scm.com/book/en/Git-Basics-Viewing-the-Commit-History) ...

5 Aug at 13:15

How to merge specific files from Git branches

How to merge specific files from Git branches I have 2 git branches: 1. branch1 2. branch2 I want to merge `file.py` into `file.py` in and only that file. In essence I just want to work on the `file.p...

26 Oct at 13:48

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 do I list all remote branches in Git 1.7+?

How do I list all remote branches in Git 1.7+? I've tried `git branch -r`, but that only lists remote branches that I've tracked locally. How do I find the list of those that I haven't? (It doesn't ma...

12 Aug at 20:37

How to unmerge a Git merge?

How to unmerge a Git merge? I accidentally did a `git pull origin master` from dev, and master got merged into dev. Is it possible to unmerge? I've already seen different solutions, i tried this one f...

13 Aug at 17:10

Git error on commit after merge - fatal: cannot do a partial commit during a merge

Git error on commit after merge - fatal: cannot do a partial commit during a merge I ran a `git pull` that ended in a conflict. I resolved the conflict and everything is fine now (I used mergetool als...

Getting the difference between two repositories

Getting the difference between two repositories How can we get the difference between two git repositories? The scenario: We have a repo_a and repo_b. The latter was created as a copy of repo_a. There...

21 Nov at 13:10

Git diff says subproject is dirty

Git diff says subproject is dirty I have just run a git diff, and I am getting the following output for all of my approx 10 submodules ``` diff --git a/.vim/bundle/bufexplorer b/.vim/bundle/bufexplore...

16 Jun at 11:59

How do I name and retrieve a Git stash by name?

How do I name and retrieve a Git stash by name? How do I save/apply a stash with a name? I don't want to have to look up its index number in `git stash list`. I tried `git stash save "my_stash_name"`,...

2 Sep at 02:0

Is it possible to find out the users who have checked out my project on GitHub?

Is it possible to find out the users who have checked out my project on GitHub? I'm wondering if there is any way to know who has checked out my project hosted on GitHub? This would include people who...

3 Mar at 02:22

Change drive in git bash for windows

Change drive in git bash for windows I was trying to navigate to my drive location `E:/Study/Codes` in `git bash` in windows. In command prompt in order to change drive I use `E:` It returns an error ...

5 May at 03:1

How do I show the changes which have been staged?

How do I show the changes which have been staged? I staged a few changes to be committed. How do I see the diffs of all files which are staged for the next commit? Is there a handy one-liner for this?...

25 Jul at 02:23

Undo a Git merge that hasn't been pushed yet

Undo a Git merge that hasn't been pushed yet I accidentally ran `git merge some_other_branch` on my local master branch. I haven't pushed the changes to origin master. How do I undo the merge? --- Aft...

8 Jul at 05:11

Your branch is ahead of 'origin/master' by 3 commits

Your branch is ahead of 'origin/master' by 3 commits I am getting the following when running `git status` I have read on some other post the way to fix this is run `git pull --rebase` but what exactly...

30 Oct at 02:43

How can I see the changes in a Git commit?

How can I see the changes in a Git commit? When I do `git diff COMMIT` I see the changes between that commit and HEAD (as far as I know), but I would like to see the changes that were made by that sin...

11 Apr at 09:19

How can I selectively merge or pick changes from another branch in Git?

How can I selectively merge or pick changes from another branch in Git? I'm using Git on a new project that has two parallel -- but currently experimental -- development branches: - `master`- `exp1`- ...

How do I revert all local changes in Git managed project to previous state?

How do I revert all local changes in Git managed project to previous state? I ran `git status` which told me everything was up to date and there were no local changes. Then I made several consecutive ...

17 Jul at 00:42

How come npm install doesn't work on git bash

How come npm install doesn't work on git bash I have git bash open and I type in `npm install` and then it returns: I don't understand, because I have `node.js` command prompt and when I type in `npm ...

10 Mar at 12:21

Change a Git remote HEAD to point to something besides master

Change a Git remote HEAD to point to something besides master How do I set a Git remote's HEAD reference to point to something besides "master"? My project has a policy not to use a "master" branch (a...

3 Feb at 00:57

Git - What is the difference between push.default "matching" and "simple"

Git - What is the difference between push.default "matching" and "simple" I have been using git for a while now, but I have never had to set up a new remote repo myself and I have been curious on doin...

27 Jul at 13:59

Remove a git commit which has not been pushed

Remove a git commit which has not been pushed I did a `git commit` but I have not pushed it to the repository yet. So when I do `git status`, I get '# Your branch is ahead of 'master' by 1 commit. So ...

8 Mar at 18:54

View a file in a different Git branch without changing branches

View a file in a different Git branch without changing branches Is it possible to open a file in a git branch without checking out that branch? How? Essentially I want to be able to open a file in my ...

14 Feb at 15:28

Remove a file from a Git repository without deleting it from the local filesystem

Remove a file from a Git repository without deleting it from the local filesystem I want to remove a file from my repository. will remove the file from the repository, but it will also remove the file...