Questions tagged [version-control]
Version control is the management of changes to documents, programs, and other information stored as computer files. Use this tag to mark general questions about usage and applicability of version control, VCS comparison. For most commands and techniques specific to each particular VCS there are specific tags, which should be preferred.
version-control
2,437
questions
1125
votes
24
answers
484k
views
How can I remove/delete a large file from the commit history in the Git repository?
I accidentally dropped a DVD-rip into a website project, carelessly git commit -a -m ..., and, zap, the repository was bloated by 2.2 GB. Next time I made some edits, deleted the video file, and ...
26532
votes
108
answers
14.6m
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 do I undo those commits from the local repository?
3094
votes
43
answers
1.2m
views
How do I change the author and committer name/email for multiple commits?
How do I change the author for a range of commits?
20374
votes
41
answers
11.7m
views
How do I delete a Git branch locally and remotely?
Failed Attempts to Delete a Remote Branch:
$ git branch -d remotes/origin/bugfix
error: branch 'remotes/origin/bugfix' not found.
$ git branch -d origin/bugfix
error: branch 'origin/bugfix' not found....
2848
votes
21
answers
939k
views
Ignore files that have already been committed to a Git repository [duplicate]
I have an already initialized Git repository that I added a .gitignore file to. How can I refresh the file index so the files I want ignored get ignored?
854
votes
37
answers
760k
views
Git for beginners: The definitive practical guide
Ok, after seeing this post by PJ Hyett, I have decided to skip to the end and go with Git.
So what I need is a beginner's practical guide to Git. "Beginner" being defined as someone who knows how to ...
13860
votes
37
answers
3.5m
views
What is the difference between 'git pull' and 'git fetch'?
What are the differences between git pull and git fetch?
1069
votes
6
answers
385k
views
Definition of "downstream" and "upstream"
I've started playing with Git and have come across the terms "upstream" and "downstream". I've seen these before but never understood them fully. What do these terms mean in the context of SCMs (...
9728
votes
54
answers
8.7m
views
How do I force "git pull" to overwrite local files?
How do I force an overwrite of local files on a git pull? My local repository contains a file of the same filename as on the server.
error: Untracked working tree file 'example.txt' would be ...
2418
votes
19
answers
991k
views
When do you use Git rebase instead of Git merge?
When is it recommended to use Git rebase vs. Git merge?
Do I still need to merge after a successful rebase?
5766
votes
37
answers
3.1m
views
How can I reset or revert a file to a specific revision?
How can I revert a modified file to its previous revision at a specific commit hash (which I determined via git log and git diff)?
1663
votes
21
answers
886k
views
How can I undo git reset --hard HEAD~1?
Is it possible to undo the changes caused by the following command? If so, how?
git reset --hard HEAD~1
812
votes
43
answers
536k
views
Multiple GitHub accounts on the same computer?
Trying to work on both my actual "work" repos, and my repos on GitHub, from my computer.
The work account was set up first, and everything works flawlessly.
My account, however, cannot seem ...
1184
votes
19
answers
429k
views
What's the difference between git reset --mixed, --soft, and --hard?
I'm looking to split a commit up and not sure which reset option to use.
I was looking at the page In plain English, what does "git reset" do?, but I realized I don't really understand what ...
206
votes
8
answers
212k
views
Why do I need to explicitly push a new branch?
I am new in git and I am practicing. I created a local branch but I saw that when I did git push my branch was not uploaded to the repository. I had to actually do: git push -u origin --all.
Why is ...