I just found out, that one of my test files is missing about 20 lines on the top. I’ve been recently trying to master VIM, so I guess I somehow managed to delete those lines without me even noticing, and then commiting it into the repository. Now the question is, what’s the best way to […]
As in the title: “How to go back to last commit + delete all newly created file?” Thanks.
I ran into an unusual git issue earlier that I’ve since resolved, but I’m still curious as to why it happened. The problem occurred when I accidentally deleted the branch I was currently working on. Normally git wouldn’t allow this, but due to case-insensitivity on OSX I got myself into a situation where I thought […]
By mistake I used git add . so all files are added in staring area. I want to remove all those files from staring area. I tried git clean -fdx git clean -df but it isn’t worked.
I’m trying to make the case for switching our organization to Git from SVN. Right now our workflow essentially looks like this: Developer makes changes, then commits to Beta branch QA finds bugs, then tells the dev to fix them GOTO 1. Repeat at least 5 times. (We have no test suite. Another issue…) Peer […]
Am wondering what exactly is the difference between amend and squash commands, as I tried both and found that both are doing the same for proper management.
The git-hooks pre-push documentation states that the first line of stdin will be populated with the local ref and sha, and the remote ref and sha as such: <local ref> SP <local sha1> SP <remote ref> SP <remote sha1> LF However, my simple pre-push script: #!/bin/bash echo “params=[$@]” read line echo “stdin=[$line]” exit 1 returns […]
I have a git repository on a company network drive and had no problem pulling from it. However, i wasn’t able to push any commits into it, though I had a few good luck but recently I couldn’t get anything in it. The error was: C:\Program Files\Git\bin\git.exe push “origin” master:master error: Couldn’t set refs/heads/master To […]
I had recently stumbled upon a common problem in Git when creating branch groups: I had a branch called “tim“. I wanted to make a folder/group called “tim“, with the “tim” branch inside it, resulting in the branch path being “tim/tim“. When I tried to do this, Git really hated me because the folder “tim” […]
I want to combine a cvs and a svn repository into a new git repo, without loosing history of course. The catch is the svn repo is a direct continuation of the cvs repo historywise. Someone just created the svn repo and clumsily added the last state from cvs without keeping any history. The most […]