tagged [git]

`git fetch` a remote branch

`git fetch` a remote branch The remote repository contains various branches such as `origin/daves_branch`: How do I switch to `daves_branch` in the local repository so that it tracks `origin/daves_bra...

19 Feb at 18:25

How can I save username and password in Git?

How can I save username and password in Git? I want to use a push and pull automatically in [Git Extensions](http://gitextensions.github.io/), [Sourcetree](https://en.wikipedia.org/wiki/Atlassian#Acqu...

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

How to checkout a remote branch in Git?

How to checkout a remote branch in Git? Someone pushed a "new feature" branch to the shared repo: Now, I would like to create a copy of this branch on my local machine in order to test the new feature...

16 Jan at 18:39

Remove file from latest commit

Remove file from latest commit How do I remove a file from the latest commit?

17 Jul at 00:52

Merge, update, and pull Git branches without using checkouts

Merge, update, and pull Git branches without using checkouts I work on a project that has 2 branches, A and B. I typically work on branch A, and merge stuff from branch B. For the merging, I would typ...

28 Jul at 05:5

Show git diff on file in staging area

Show git diff on file in staging area Is there a way I can see the changes that were made to a `file` after I have done `git add file`? That is, when I do: no diff is shown. I guess there's a way to s...

6 May at 00:28

How do I ignore an error on 'git pull' about my local changes would be overwritten by merge?

How do I ignore an error on 'git pull' about my local changes would be overwritten by merge? How do I ignore the following error message on Git pull? > Your local changes to the following files would ...

22 Apr at 11:5

Unable to Connect to GitHub.com For Cloning

Unable to Connect to GitHub.com For Cloning I am trying to clone the [angular-phonecat git repository](https://github.com/angular/angular-phonecat), but I am getting the following message when I enter...

14 Sep at 05:58

Show just the current branch in Git

Show just the current branch in Git Is there a Git command equivalent to:

8 Jul at 06:44

Remote origin already exists on 'git push' to a new repository

Remote origin already exists on 'git push' to a new repository I have my project on GitHub at some location, `git@github.com:myname/oldrep.git`. Now I want to push all my code to a new repository at s...

16 Oct at 15:41

Git: Find the most recent common ancestor of two branches

Git: Find the most recent common ancestor of two branches How to find the most recent common ancestor of two Git branches?

10 Nov at 12:33

Branch from a previous commit using Git

Branch from a previous commit using Git If I have `N` commits, how do I branch from the `N-3` commit?

25 Jul at 02:37

How do I see the differences between two branches?

How do I see the differences between two branches? How do I see the differences between branches `branch_1` and `branch_2`?

7 Aug at 20:12

Ignoring directories in Git repositories on Windows

Ignoring directories in Git repositories on Windows How can I ignore directories or folders in Git using msysgit on Windows?

14 Nov at 13:48

How do I squash my last N commits together?

How do I squash my last N commits together? How do I squash my last N commits together into one commit?

8 Jul at 04:55

How do I get the current branch name in Git?

How do I get the current branch name in Git? How do I get the name of the current branch in Git?

8 Jul at 06:38

How do I commit case-sensitive only filename changes in Git?

How do I commit case-sensitive only filename changes in Git? I have changed a few files name by de-capitalize the first letter, as in `Name.jpg` to `name.jpg`. Git does not recognize this changes and ...

How do I get the hash for the current commit in Git?

How do I get the hash for the current commit in Git? How do I get the hash of the current commit in Git?

25 Jul at 02:45

Retrieve a single file from a repository

Retrieve a single file from a repository What is the most efficient mechanism (in respect to data transferred and disk space used) to get the contents of a single file from a remote git repository? So...

How do I remove local (untracked) files from the current Git working tree?

How do I remove local (untracked) files from the current Git working tree? How do I delete untracked local files from the current working tree?

3 Aug at 04:58

How to sparsely checkout only one single file from a git repository?

How to sparsely checkout only one single file from a git repository? How do I checkout just one file from a git repo?

14 Nov at 17:19

How to change folder with git bash?

How to change folder with git bash? My default `git` folder is `C:\Users\username\.git`. What command should I use to go into `C:/project`?

15 Oct at 07:59

How to unstash only certain files?

How to unstash only certain files? I stashed my changes. Now I want to unstash only some files from the stash. How can I do this?

17 Mar at 09:16

How do I add an empty directory to a Git repository?

How do I add an empty directory to a Git repository? How do I add an empty directory (that contains no files) to a Git repository?

18 Jul at 18:41