Tag: git

Running PowerShell scripts as git hooks

Is it possible to run PowerShell scripts as git hooks? I am running git in a PowerShell prompt, which shouldn’t make any difference, but I can’t seem to get them to work, as the hooks are named without extensions, and PowerShell needs (AFAIK) the .ps1 extension. I am not sure if that is the issue, […]

GIT undo a commit that isn't the most recent, rebase all commits since

Earlier on, I committed some code which at the time seemed like a good idea, but in fact it made things worse. I’d like to remove the change from the history as it is not helpful, and rebase all commits since – they should all merge without issues. I tried creating a new branch (called […]

.gitignore: Ignore one specific directory and that one only

This question already has an answer here: How to exclude file only from root folder in Git 4 answers

git: How to get “ours, theirs, original” for merge conflicts?

Git merge conflicts are shown like this usually: <<<<<<< HEAD:file.txt Code changed by A ======= Code changed by B >>>>>>> 77976da35a11db4580b80ae27e8d65caf5208086:file.txt However, I know it is possible (with some git config option) to to also show the original code, and not only the changes. Something like: <<<<<<< HEAD:file.txt Code changed by A ======= Original code […]

Strong access control for Gollum?

What is the best way to add multiple role access to a Gollum wiki? I understand how to add Basic HTTP auth via, Rack middleware. However, I would like to know what’s required to have full multi user/role authentication and authorization. Can Devise or OmniAuth be used in a similar way to a Rails app? […]

Accidentally branched off of the wrong branch, and when I want to merge into the master I have to merge both branches

So I created a branch off of another branch I was already creating, and now when I try to merge the branches into master, I have run into the situation where I have to merge both branches. Here is a diagram Master-> ->Branch 1 -> Branch 2 I want to be able to merge just […]

What is a good .gitignore to use with Rails on Heroku?

What is a good .gitignore to use with Rails on Heroku? *.log *.sqlite3 what else?

git gui: how to clone and push?

I think I am stupid. I don’t understand how Git works with the command lines so I am using Git Gui. I got it install and the Gui can be launched successfully, but when I come to clone the file from the files which is shared by another programmer with me, I keep getting this […]

Set UTF-8 display for Git GUI differences window

I can’t remember how I made Git GUI to display UTF-8 encoded differences correctly. Also I can’t find the guide in search engines. Now I need to do this at new workplace. Could you write down instructions? OS: Windows 7

fatal: unable to get credential storage lock: File exists

I am using git-scm and tried to push to a repository. Upon doing so, I was greeted with the following message: fatal: unable to get credential storage lock: File exists While the push did end up pushing successfully, I was wondering why this error appeared. It is still doing this, and was not doing this […]

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