Github: commit from unrelated branch appearing in pull request

I’ve read the docs, I’ve looked at similar questions and I must still be overlooking something extremely simple. Here’s what I want to accomplish: Fork a repo. Create branch issue1, commit a fix for issue #1, push. Create a pull request from issue1, only with the fix for issue #1. Create branch issue2, commit a […]

Interactive adding: Don't add lines with specific pattern

I’m currently working on a large legacy project which undergoes quite some refactoring. As you can guess this also means lots of deletions etc.. At the moment I’m removing a specific feature which has become obsolet, so I want to keep my changes related to the removal of this feature. While I’m doing this I […]

Git post-receive hook not working but post-commit works

Long story short, I created a test repo on github, cloned it locally on my linux machine. Created a post-commit hook with the following content: #!/bin/bash echo Test message Added perms 777 for the hook, changed a file and when I performed the commit, I got the message on the console. So the post-commit hook […]

Adding SSH-key through curl: Fingerprint cannot be generated

I’m writing an bash script that will add an SSH-key to an in-house Gitlab server. Below is the code: userToken=$(curl http://gitserver/api/v3/session –data ‘login=*****&password=****’ | jq ‘.private_token’) userToken=$(echo “$userToken” | tr -d ‘”‘) # Below key is for testing, will use output of cat ~/.ssh/ later on sshKey=”ssh-rsa AA*********L ****@***com” curl –data “private_token=$userToken&title=keyName&key=$sshKey” “http://gitserver/api/v3/user/keys” But I […]

Does git send entire lines in commits?

I have a binary file that I’m forcing git to view as a text file. When I make a change, the entire line is shown in the diff. If I have a line that is 100mb, and I change 1 byte, is git smart enough to only send the 1 byte difference? Or will it […]

Delete button is not working

Html Table: <table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″ id=”table-data”> <tr> <td>Name</td> <td>Location</td> <td>From</td> <td>To</td> <td>Add</td> </tr> <tr class=”tr_clone”> <td><input type=”text” placeholder=”who” name=”who” /></td> <td><input type=”text” placeholder=”location” name=”location” /></td> <td><input type=”text” placeholder=”Start Date” name=”datepicker_start” class=”datepicker”/></td> <td><input type=”text” placeholder=”End Date” name=”datepicker_end” class=”datepicker”/></td> <td><input type=”button” name=”add” value=”Add” class=”tr_clone_add”/></td> <td><input type=”button” value=”Delete” onclick=”deleteRow(this)”/></td> </tr> </table><!– /table#table-data –> Javascript: $(“input.tr_clone_add”).live(‘click’, function() […]

.REMOTE and .Local results are reversed

I am using SourceTree for performing/managing my file commits, pushes, pulls and merges. I use BeyondCompare as the external Merge/Diff tool and have it set in the options. While managing one of the merge conflicts, I launched the Bcomp; this brings up 3 panes ending with .LOCAL, .REMOTE and .MERGED in their file names and […]

How to tell if Git author changed post commit? (e.g. if history was rewritten)

If someone goes into git and rewrites the history post commit to update the author and date information, is there a way to find that someone ran this history update command? For example: Developer Joe checks in code. Joe doesn’t want to be associated with that checkin, so he goes and updates history to show […]

git Permission denied (publickey)

I met some problem when I want to set up ssh to my git. Here is the error message I got. mbp-op-159:.ssh weiting.cheng$ ssh -vT OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 20: Applying options for * debug1: Connecting to [] port 22. debug1: Connection established. […]

Why is the index not updated after doing a git add in a pre-commit hook?

I have a pre-commit hook that: checks if my version file needs to be updated modifies said file performs a git add on this file This allows me to add the updated version file to the same commit. The only problem I have is, after the hook runs the working tree and HEAD are updated […]

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