GIT

Git is an open-source distributed version control system (DVCS). Use this tag for questions related to Git usage and workflows. Do not use this tag for general programming questions that happen to involve a Git repository.

66 votes
21 answers
2.8K views
git replacing LF with CRLF

Running git on a Windows XP machine, using bash. I exported my project from SVN, and then cloned a bare reposi

avatar
Daniel
0 1 0 9
asked 07 September, 2021
58 votes
11 answers
983 views
How do you push a tag to a remote repository using Git?

I have cloned a remote Git repository to my laptop, then I wanted to add a tag so I ran git tag mytag master

avatar
Robt
0 1 0 9
asked 07 September, 2021
59 votes
30 answers
1.1K views
How to change the author and committer name and e-mail of multiple commits in Git?

I was writing a simple script in the school computer, and committing the changes to Git (in a repo that was in

avatar
Adolfo
0 1 0 9
asked 07 September, 2021
67 votes
30 answers
2.7K views
Git fetch remote branch

My colleague and I are working on the same repository. We've branched it into two branches, each technica

avatar
Brianne
0 1 0 9
asked 07 September, 2021
48 votes
16 answers
559 views
How to modify a specified commit?

I usually submit a list of commits for review. If I have the following commits: HEAD Commit3 Commit2 Comm

avatar
Mikki
0 1 0 9
asked 07 September, 2021
61 votes
21 answers
993 views
Ignore files that have already been committed to a Git repository

I have an already initialized Git repository that I added a .gitignore file to. How can I refresh the fil

avatar
Wilber
0 1 0 9
asked 07 September, 2021
53 votes
12 answers
1.3K views
What does cherry-picking a commit with Git mean?

Recently, I have been asked to cherry-pick a commit. So what does cherry-picking a commit in git mean? How d

avatar
Solomon
0 1 0 9
asked 07 September, 2021
54 votes
25 answers
3K views
Git refusing to merge unrelated histories on rebase

During git rebase origin/development the following error message is shown from Git: fatal: refusing to merge

avatar
Hildegard
0 1 0 9
asked 07 September, 2021
50 votes
15 answers
391 views
I ran into a merge conflict. How can I abort the merge?

I used git pull and had a merge conflict: unmerged: _widget.html.erb You are in the middle of a conflicted

avatar
Majorie
0 1 0 9
asked 07 September, 2021
58 votes
29 answers
3.1K views
How do I make Git use the editor of my choice for commits?

I would prefer to write my commit messages in Vim, but it is opening them in Emacs. How do I configure Git to

avatar
Hallie
0 1 0 9
asked 07 September, 2021
57 votes
29 answers
2.4K views
How to find and restore a deleted file in a Git repository

Say I'm in a Git repository. I delete a file and commit that change. I continue working and make some mor

avatar
Hilario
0 1 0 9
asked 07 September, 2021
66 votes
25 answers
1.7K views
Commit only part of a file in Git

When I make changes to a file in Git, how can I commit only some of the changes? For example, how could I com

avatar
Dusty
0 1 0 9
asked 07 September, 2021
54 votes
28 answers
2.2K views
How do I list all of the files in a commit?

I am looking for a simple Git command that provides a nicely formatted list of all files that were part of the

avatar
Jesenia
0 1 0 9
asked 07 September, 2021
48 votes
30 answers
515 views
How to get the current branch name in Git?

I'm from a Subversion background and, when I had a branch, I knew what I was working on with "These worki

avatar
Santiago
0 1 0 9
asked 07 September, 2021
54 votes
12 answers
3K views
Difference between "git add -A" and "git add ."

The command git add [--all|-A] appears to be identical to git add .. Is this correct? If not, how do they diff

avatar
Nidia
0 1 0 9
asked 07 September, 2021
50 votes
30 answers
2K views
Message 'src refspec master does not match any' when pushing commits in Git

I clone my repository with: git clone ssh://xxxxx/xx.git But after I change some files and add and commit

avatar
Luis
0 1 0 9
asked 07 September, 2021
64 votes
12 answers
1.8K views
Remove a file from a Git repository without deleting it from the local filesystem

My initial commit contained some log files. I've added *log to my .gitignore, and now I want to remove th

avatar
Benton
0 1 0 9
asked 07 September, 2021
58 votes
30 answers
2.2K views
Stash only one file out of multiple files that have changed with Git?

How can I stash only one of multiple changed files on my branch?

avatar
Wilber
0 1 0 9
asked 07 September, 2021
54 votes
24 answers
2.5K views
View the change history of a file using Git versioning

How can I view the change history of an individual file in Git, complete details with what has changed? I have

avatar
Alba
0 1 0 9
asked 07 September, 2021
58 votes
24 answers
519 views
How do you create a remote Git branch?

I created a local branch which I want to 'push' upstream. There is a similar question here on Stack

avatar
Rudy
0 1 0 9
asked 07 September, 2021