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 […]

Revert commits unique to a branch

I have just finished fixing an extremely long merge conflict and then realised I merged to the wrong branch! I merged to dev-majorversion when I meant to merge to dev-majorversion.minorversion. Is there any way I can undo the commits that exist on majorversion but do not exist on minorversion for branch to undo these commits, […]

Android Studio: How to add line break in git commit message?

When inserting the git commit message, how can I add a line break? Writing another message on a new line doesn’t have the effect and the 2 messages are shown in one line on the site (Bitbucket). I know I can achieve this with command line, but what about here?

Git Rebase after Cherry-Pick

Let’s say i have to branches: dd2e86 – 946992 – 9143a9 – a6fd86 – 5a6057 [master] \ 76cada – 62ecb3 – b886a0 [development] Now a commit from devel is required in the master branch, so i cherry-pick it: git checkout master git cherry-pick 62ecb3 Assumed that some hotfixes are committed to master, can the development […]

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