tagged [git]

What does cherry-picking a commit with Git mean?

What does cherry-picking a commit with Git mean? What does [git cherry-pick ](https://git-scm.com/docs/git-cherry-pick) do?

11 Jul at 05:58

git stash -> merge stashed change with current changes

git stash -> merge stashed change with current changes I made some changes to my branch and realized I forgot I had stashed some other necessary changes to said branch. What I want is a way to merge m...

24 Jun at 12:33

"git rm --cached x" vs "git reset head --​ x"?

"git rm --cached x" vs "git reset head --​ x"? [GitRef.org - Basic](http://gitref.org/basic/): > `git rm` will remove entries from the staging area. This is a bit different from `git reset HEAD` whi...

15 Jan at 04:1

How can I see 'git diff' on the Visual Studio Code side-by-side file?

How can I see 'git diff' on the Visual Studio Code side-by-side file? I would like to know how to see as a file with the command `git diff master origin/master` in the terminal on Visual Studio Code. ...

Link to the issue number on GitHub within a commit message

Link to the issue number on GitHub within a commit message Is it somehow possible to have a link to GitHub issue number in the `git commit` message?

3 Apr at 00:1

Change a branch name in a Git repo

Change a branch name in a Git repo How do I rename an existing branch in a Git repo? I want the current branch to have a new name.

20 Apr at 03:36

How to cherry-pick a range of commits and merge them into another branch?

How to cherry-pick a range of commits and merge them into another branch? I have the following repository layout: - - - What I want to achieve is to cherry-pick a range of commits from the working bra...

23 Aug at 08:31

How to fully delete a git repository created with init?

How to fully delete a git repository created with init? I created a git repository with `git init`. I'd like to delete it entirely and init a new one.

13 Sep at 22:48

How can I undo git reset --hard HEAD~1?

How can I undo git reset --hard HEAD~1? Is it possible to undo the changes caused by the following command? If so, how?

20 Dec at 15:41

How to diff one file to an arbitrary version in Git?

How to diff one file to an arbitrary version in Git? How can I diff a file, say `pom.xml`, from the master branch to an arbitrary older version in Git?

18 Dec at 21:14

How to clone git repository with specific revision/changeset?

How to clone git repository with specific revision/changeset? How can I clone git repository with specific revision, something like I usually do in Mercurial:

31 May at 09:59

Git diff against a stash

Git diff against a stash How can I see the changes un-stashing will make to the current working tree? I would like to know what changes will be made before applying them!

13 Apr at 16:15

How do I "git clone" a repo, including its submodules?

How do I "git clone" a repo, including its submodules? How do I clone a git repository so that it also clones its submodules? Running `git clone $REPO_URL` merely creates empty submodule directories.

17 Jul at 00:43

How can I view a git log of just one user's commits?

How can I view a git log of just one user's commits? When using `git log`, how can I filter by user so that I see only commits from that user?

27 Oct at 13:51

Git submodule push

Git submodule push If I modify a submodule, can I push the commit back to the submodule origin, or would that require a clone? If clone, can I store a clone inside another repository?

28 Feb at 11:45

How to `git pull` while ignoring local changes?

How to `git pull` while ignoring local changes? Is there a way to do a `git pull` that ignores any local file changes without blowing the directory away and having to perform a `git clone`?

25 Oct at 18:0

What's the significance of the "No newline at end of file" log?

What's the significance of the "No newline at end of file" log? When doing a `git diff` it says . What's the significance of the message and what's it trying to tell us?

14 Apr at 19:27

git push --force-with-lease vs. --force

git push --force-with-lease vs. --force I am trying to understand the difference between and My guess is that the latter only pushes to the remote ?

7 Dec at 19:15

How to push a single file in a subdirectory to Github (not master)

How to push a single file in a subdirectory to Github (not master) I have changed a single file in a subdirectory of my repository and I want to push just that file to Github. I've made a small chang...

27 Dec at 01:24

Create a git patch from the uncommitted changes in the current working directory

Create a git patch from the uncommitted changes in the current working directory Say I have uncommitted changes in my working directory. How can I make a patch from those without having to create a co...

22 Aug at 09:32

How can I delete all of my Git stashes at once?

How can I delete all of my Git stashes at once? How can I delete all of my [Git](https://en.wikipedia.org/wiki/Git) stashes at once? Specifically I mean, with typing in one command.

7 Jan at 09:22

How to exit git log or git diff

How to exit git log or git diff I'm trying to learn Git with the help of [Git Immersion](http://gitimmersion.com/). There's one thing that frustrates me whenever I use `git log` or `git diff`: ![Git l...

17 Apr at 17:57

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...

Staging Deleted files

Staging Deleted files Say I have a file in my git repository called `foo`. Suppose it has been deleted with `rm` (not `git rm`). Then git status will show: How do I stage this individual file deletion...

10 Feb at 09:40

How can I view an old version of a file with Git?

How can I view an old version of a file with Git? Is there a command in Git to see (either dumped to stdout, or in `$PAGER` or `$EDITOR`) a particular version of a particular file?

16 Jul at 11:30