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.

64 votes
30 answers
339 views
How can I make Git "forget" about a file that was tracked, but is now in .gitignore?

There is a file that was being tracked by Git, but now the file is on the .gitignore list. However, that file

avatar
Hilario
0 1 0 9
asked 07 September, 2021
59 votes
30 answers
2.1K views
How to remove local (untracked) files from the current Git working tree

How do you delete untracked local files from your current working tree?

avatar
Wilfredo
0 1 0 9
asked 07 September, 2021
57 votes
30 answers
1.1K views
How do I check out a remote Git branch?

Somebody pushed a branch called test with git push origin test to a shared repository. I can see the branch wi

avatar
Robt
0 1 0 9
asked 07 September, 2021
62 votes
30 answers
981 views
64 votes
27 answers
1.8K views
57 votes
30 answers
1.2K views
Git: How do I force "git pull" to overwrite local files?

How do I force an overwrite of local files on a git pull? The scenario is the following: A team member is mo

avatar
Carmelina
0 1 0 9
asked 07 September, 2021
63 votes
30 answers
1.6K views
How do I rename a local Git branch?

I don't want to rename a remote branch, as described in Rename master branch for both local and remote Gi

avatar
Chelsea
0 1 0 9
asked 07 September, 2021
55 votes
30 answers
2.5K views
54 votes
30 answers
2K views
How do I delete a Git branch locally and remotely?

I want to delete a branch both locally and remotely. Failed Attempts to Delete a Remote Branch $ git branch -d

avatar
Corey
0 1 0 9
asked 07 September, 2021
62 votes
30 answers
1.2K views
How do I undo the most recent local commits in Git?

I accidentally committed the wrong files to Git, but didn't push the commit to the server yet. How can I

avatar
Denese
0 1 0 9
asked 07 September, 2021