The issue was a heavy amount of shell customization. If I try to create a new repo with git init it gives me fatal: bad default revision ‘HEAD’ twice. If I do git log it gives me the same error three times. I have deleted ~/.git , ~/.config , and ~/.gitconfig based on other answers […]
I’ve got a git repo set up on my iMac and I’d like to download it to my MacBook so I can work on it there. How do I do that?
I do a lot of my coding on my school Mac, but I can’t install any new programs on it due to school policy. I’ve been using SVN for all my projects since it’s pre-installed, but I would like to migrate to git. Is there any way to use Subversion alongside git? Can they somehow […]
I sometimes struggle trying to see what was going on in the history of git repositories, even with great tools like SourceTree the branch diagrams can be confusing. The main problem for me is that I can’t tell which branches some commits were made on, and the string of commits on a single branch are […]
Another developer has deleted and rebuilt a remote branch called “development” which I already have a checked out copy. He did this delete and rebuild to remove some cruft from it. Which is great. But when I do a “git pull origin development” it keeps getting merge conflicts. Yet I don’t want what I have […]
I have used the following command to add a file to the repository with some default settings, then change the settings locally without pushing them to the repo every single time: git update-index –assume-unchanged <filepath> Now I need to push my local changes to the repo so I would need to undo this command. How […]
I need to add a SQL file to my Git repository. For some reason Tower or Git on the command line does not see that I’ve added a new file whenever it ends in .sql. I’ve tried creating an empty .sql and removed everything in .gitignore, but it still doesn’t see it. Any ideas?
I would like to look at an old commit of my app in Android Studio in order to compile and run it. I don’t want to reset back to the previous commit or change my commit history or anything like that. When I’m done, I want to go back to the latest version. On the […]
I have two branches, say B1 and B2. I’m in B2 and I have staged and unstaged files. I want the staged files to be committed in B1 (I thought I was in B1 when I git add-ed the files) and the unstaged ones to be committed in B2. Is it possible? How?
I’m familiar with using git blame on the commandline to show which commit changed a particular line of a file. Is there a similar function to show which commit last changed the file “mode”/flags? E.g. setting or unsetting the executable flag.