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.
I accidentally dropped a DVD-rip into a website project, then carelessly git commit -a -m ..., and, zap, the repo was bloated by 2.2 gigs. Next time I made some edits, deleted the video file, and ...
asked Jan 20 '10 at 11:18
culebrón
29.5k1919 gold badges6767 silver badges100100 bronze badges
I accidentally committed the wrong files to Git, but didn't push the commit to the server yet.
How can I undo those commits from the local repository?
The only way seems to be to copy the edits in ...
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?
asked Jul 16 '09 at 19:26
trobrock
44.7k1111 gold badges3636 silver badges4444 bronze badges
I want to delete a branch both 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 ...
asked Jan 5 '10 at 1:12
Matthew Rankin
416k3838 gold badges117117 silver badges159159 bronze badges
I was writing a simple script on the school computer, and committing the changes to Git (in a repo that was in my pen drive, cloned from my computer at home). After several commits, I realized I was ...
asked Apr 15 '09 at 3:09
Flávio Amieiro
37.1k88 gold badges3030 silver badges2424 bronze badges
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 ...
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 (...
asked Apr 29 '10 at 17:18
brendan
11.2k33 gold badges2424 silver badges2525 bronze badges
What are the differences between git pull and git fetch?
asked Nov 15 '08 at 9:51
pupeno
264k117117 gold badges335335 silver badges558558 bronze badges
How do I force an overwrite of local files on a git pull?
The scenario is the following:
A team member is modifying the templates for a website we are working on
They are adding some images to the ...
asked Jul 14 '09 at 14:58
Jakub Troszok
88.1k1010 gold badges3737 silver badges5050 bronze badges
I have made some changes to a file which has been committed a few times as part of a group of files, but now want to reset/revert the changes on it back to a previous version.
I have done a git log ...
asked Oct 18 '08 at 23:34
Hates_
60.9k66 gold badges3030 silver badges3737 bronze badges
When is it recommended to use Git rebase vs. Git merge?
Do I still need to merge after a successful rebase?
asked Apr 29 '09 at 20:26
Coocoo4Cocoa
43.5k5050 gold badges148148 silver badges175175 bronze badges
Is it possible to undo the changes caused by the following command? If so, how?
git reset --hard HEAD~1
asked Aug 7 '08 at 23:22
Paul Wicks
57.5k5454 gold badges117117 silver badges144144 bronze badges
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 ...
asked Jun 13 '13 at 20:21
Cratylus
50.6k6161 gold badges198198 silver badges330330 bronze badges
How can I query git to find out which branches contain a given commit? gitk will usually list the branches, unless there are too many, in which case it just says "many (38)" or something like that. I ...
asked Sep 14 '09 at 4:03
Andrew Arnott
76.3k2424 gold badges128128 silver badges166166 bronze badges
Given the hash of a blob, is there a way to get a list of commits that have this blob in their tree?
asked Oct 21 '08 at 22:00
readonly
316k103103 gold badges201201 silver badges203203 bronze badges
Trying to work on both my actual "work" repos, and my repos on git hub, from my computer.
The work account was set up first, and everything works flawlessly.
My account, however, cannot seem ...
asked Oct 5 '10 at 0:28
Kevin Whitaker
10.5k1111 gold badges4949 silver badges8686 bronze badges
I read the Git manual, FAQ, Git - SVN crash course, etc. and they all explain this and that, but nowhere can you find a simple instruction like:
SVN repository in: svn://myserver/path/to/svn/repos
...
Which files should I include in .gitignore when using Git in conjunction with Xcode?
asked Sep 8 '08 at 11:07
Hagelin
15.8k55 gold badges2828 silver badges3737 bronze badges
I sometimes work with Codeigniter, and after I'm done developing on the local site, I need to migrate the files to the server. All the files in the /config/ folder need to be changed to match the ...
asked May 13 '12 at 11:31
Aditya M P
4,70966 gold badges3535 silver badges6969 bronze badges
I've been using Git now for a couple of months on a project with one other developer. I have several years of experience with SVN, so I guess I bring a lot of baggage to the relationship.
I have ...
asked Jan 19 '09 at 15:16
Micah
17.1k77 gold badges3939 silver badges4646 bronze badges
I'm working on a team with a few developers using git on BitBucket. We are all working on a dev branch, not pushing to master until a release.
One of the developers committed incorrect code that ...
asked Jun 23 '14 at 0:44
thanos
2,34333 gold badges1313 silver badges2626 bronze badges
If I have a file or directory that is a symbolic link and I commit it to a Git repository, what happens to it?
I would assume that it leaves it as a symbolic link until the file is deleted and then ...
asked Jun 5 '09 at 6:53
Alex
31.3k1010 gold badges5151 silver badges6767 bronze badges
How do I get Git to use a proxy server?
I need to check out code from a Git server, but it shows "Request timed out" every time. How do I get around this?
Alternatively, how can I set a proxy ...
asked Apr 23 '09 at 22:32
Debajit
44.1k3232 gold badges8888 silver badges9898 bronze badges
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 ...
asked Aug 20 '10 at 4:41
Michael Chinen
15.4k55 gold badges2929 silver badges4545 bronze badges
When working with a SCM system, when should you branch?
asked Jan 20 '10 at 11:06
Ben Aston
47.9k5757 gold badges184184 silver badges309309 bronze badges
A common scenario when I develop is that the codebase will have several config files which require machine specific settings. These files will be checked into Git and other developers will always ...
asked Sep 8 '09 at 22:13
ghempton
7,58766 gold badges4444 silver badges5353 bronze badges
I am looking for opinions of how to handle large binary files on which my source code (web application) is dependent. We are currently discussing several alternatives:
Copy the binary files by hand.
...
asked Feb 12 '09 at 8:52
pi.
19.7k77 gold badges3737 silver badges5959 bronze badges
Mercurial has a way of printing the root directory (that contains .hg) via
hg root
Is there something equivalent in git to get the directory that contains the .git directory?
asked Jun 5 '09 at 20:15
wojo
9,66144 gold badges2121 silver badges2121 bronze badges
How do I discard changes in my working copy that are not in the index?
asked Sep 9 '08 at 19:33
readonly
316k103103 gold badges201201 silver badges203203 bronze badges
How can I convert a 'normal' Git repository to a bare one?
The main difference seems to be:
in the normal Git repository, you have a .git folder inside the repository containing all relevant data ...
asked Feb 4 '10 at 13:18
Boldewyn
77.5k4444 gold badges144144 silver badges207207 bronze badges
I added a new file F1 and made changes to another file F2 but then did a git reset --hard HEAD^ and I have lost all the changes to the files.
Is there some way, I can get them back?
I did look at a ...
asked Jul 10 '09 at 10:39
Susheel Javadi
2,83433 gold badges3030 silver badges3333 bronze badges
I unpacked a zip-file delivery into a clearcase view. Now I want to add the complete file tree to the repository. The GUI only provides an "Add to source control ..." for individual files/directories. ...
I don't want to rename a remote branch, as described in Rename master branch for both local and remote Git repositories.
How can I rename a local branch which hasn't been pushed to a remote repository?...
asked Jul 6 '11 at 3:20
Forrest
108k2020 gold badges7070 silver badges107107 bronze badges
I have many Git branches. How do I delete branches which have already been merged? Is there an easy way to delete them all instead of deleting them one by one?
asked May 25 '11 at 15:54
Nyambaa
33.2k99 gold badges2727 silver badges3434 bronze badges
I'm involved with updating an Access solution. It has a good amount of VBA, a number of queries, a small amount of tables, and a few forms for data entry & report generation. It's an ideal ...
asked Oct 9 '08 at 14:25
Nathan DeWitt
6,36188 gold badges4343 silver badges6565 bronze badges
I can see why distributed source control systems (DVCS - like Mercurial) make sense for open source projects.
But do they make sense for an enterprise? (over a centralized Source Control System such ...
asked Apr 15 '11 at 23:18
Raj Rao
8,4051111 gold badges6464 silver badges7777 bronze badges
I was just wondering how I could automatically increment the build (and version?) of my files using Visual Studio (2005).
If I look up the properties of say C:\Windows\notepad.exe, the Version tab ...
asked Dec 10 '08 at 15:51
inspite
28k2121 gold badges7575 silver badges9292 bronze badges
Wikipedia says a 3-way merge is less error-prone than a 2-way merge, and often times doesn't need user intervention. Why is this the case?
An example where a 3-way merge succeeds and a 2-way merge ...
This question is related to my problem in understanding rebase, branch and merge,
and to the problem
How can you commit to your github account as you have a teamMate in your remote list?
I found ...
asked May 28 '09 at 17:36
I'm using Git to manage my two computers and my development. I'm trying to commit changes to GitHub, and I got this error:
Failed to push some refs to <repo>. To prevent you from losing history,...
asked Jan 13 '11 at 19:31
Moshe
56.3k7676 gold badges264264 silver badges420420 bronze badges
Can someone tell me the difference between HEAD, working tree and index, in Git?
From what I understand, they are all names for different branches. Is my assumption correct?
Edit
I found this
A ...
asked Sep 11 '10 at 4:53
Joyce Babu
17k1111 gold badges5959 silver badges8888 bronze badges
I just started using SVN, and I have a cache directory that I don't need under source control. How can I ignore the whole directory/folder with SVN?
I am using Versions and TextMate on OS X and ...
asked Sep 22 '08 at 16:55
Gilean
14.5k1010 gold badges4444 silver badges5252 bronze badges
Can someone explain a "tracking branch" as it applies to git?
Here's the definition from git-scm.com:
A 'tracking branch' in Git is a local
branch that is connected to a remote
branch. When ...
asked Jan 14 '11 at 16:50
jerhinesmith
14.5k1616 gold badges5959 silver badges8989 bronze badges
Using Git, is there a way to tell it to accept a self signed certificate?
I am using an https server to host a git server but for now the certificate is self signed.
When I try to create the repo ...
asked Jul 23 '12 at 23:00
Ian Vink
62.3k100100 gold badges316316 silver badges540540 bronze badges
Whenever I pull from my remote, I get the following error about compression. When I run the manual compression, I get the same:
$ git gc
error: Could not read 3813783126d41a3200b35b6681357c213352ab31
...
asked Nov 23 '10 at 9:16
asgerhallas
15.1k66 gold badges4545 silver badges6363 bronze badges
Is there any way to revert or undo git pull so that my source/repos will come to old state that was before doing git pull ?
I want to do this because it merged some files which I didn't want to do so, ...
I've asked before about how to squash the first two commits in a git repository.
While the solutions are rather interesting and not really as mind-warping as some other things in git, they're still a ...
asked Mar 14 '09 at 5:31
kch
72.5k4444 gold badges129129 silver badges148148 bronze badges
The description is a bit terse. I simply added a file on my local master branch and pushed it back to a remote repo. Any idea why this is coming up?
warning: updating the current branch
warning: ...
asked Apr 29 '09 at 22:23
Coocoo4Cocoa
43.5k5050 gold badges148148 silver badges175175 bronze badges
Given that two branches have diverged and a specific commit from one branch (and not everything) needs to be introduced to the other, git cherry pick achieves exactly that.
After some time there is ...
asked Apr 13 '10 at 8:15
yannisf
5,68899 gold badges3737 silver badges6060 bronze badges
Which Eclipse files is it appropriate to put under source control, aside from the sources obviously?
In my project, specifically, I'm wondering about:
.metadata/*
project-dir/.project
project-...
asked Dec 3 '08 at 14:32
sblundy
58.8k2222 gold badges119119 silver badges121121 bronze badges