Tag: version control

Using Git without ANY working tree

Suppose you have a bare repository. It contains 3 files: a.txt b.txt c.txt. Now, suppose I don’t have the b.txt and c.txt but I have a newer version of the a.txt file. Is it possible to use some command in git and tell it to Update a.txt in the repository, without having to clone/pull the […]

DVCS working on remote server

My workplace is considering moving to a modern (D)VCS which is something that I am pushing for. My boss is in on the idea and the current workflow would be to have a centralized repository where everyone can commit/merge their changes when a task is done, While working on a task each developer can have […]

Should I commit or ignore Terraform local module symlinks?

Terraform may create a few files in a .terraform directory. The .tfstate file, which is a json file containing the state. I can review this question for that. .tfstate backups, which I’m pretty sure I can .gitignore. The modules directory, which contains links to modules. The terraform get command will create symlinks to my local […]

Git: How to create a new branch from a branch which is not current?

I have seen git branch <newBranchName> will create a new branch from the current branch. So for example if my current branch is master then git branch build5 will create a new branch build5 based on master. But if my current branch is master and I have another branch build3 and I want to create […]

Git revert back to previous commit and keep committing new changes to master

I’m on branch master, head is pointing to my last commit A which is on master and I’m wondering if the following is possible: Revert back to a previous commit B. Move all the commits from B to A (B excluded) to a new branch “experimental”. After this master’s last commit should be B and […]

“fatal: tag 'someTag' already exists”, when trying to add a tag to old commits

Question Why can I not add a tag to two older commits? git tag -a matlabTest cfa84dbb6dd3c2c9956421e723d2f99786f7b417 git tag -a matlabTest 45b3a4d83eece8a5adcb947392f15a14bd4b0e63 Instead I am getting: fatal: tag ‘matlabTest’ already exists It seems Git wants to just create a new tag rather than linking the tag to the commits? (see below for more detail). Background […]

TFS Service – Can it be used with Eclipse AND Git

Recently I tried out the new TFS-Service, and really liked the built in Scrum template for project management, and the new ability to create a team project managed with Git. It would seem that the Git integration is only possible when using Visual Studio on windows though. Using Eclipse (with the Team Explorer plugin) I […]

Does git track resource forks?

I ask myself this every time I replace a Photoshop .psd file that I have under version control. You can see with ls -l that PS has created a thumbnail icon in the resource fork.

Can you undo 'git reset –hard HEAD' if never having made a commit?

I lost some code after running git reset –hard HEAD and I never committed the work. Is there any way to get this code back? Was it logged anywhere? Can I undo the command?

Git add: Why do I have to manually specify which files to commit?

I am just learning how to use git. So, I have created a new repository, which contains a file “foo.txt”. To add this to version control, I ran git add foo.txt. Then, I made some changes to the file, and ran git commit. This then seemed to update the repository. I then made some further […]

Git Baby is a git and github fan, let's start git clone.