Tag: git

How can I add my pre-commit hook to an existing git repository

I have a pre-commit hook and I want to add it to the repository so that by checking it out my colleagues have it instantly in place. However if I try to add it ( being in the root directory of my project) I get the following result: $ git add .git/hooks/pre-commit error: Invalid path […]

Dynamic elements in bash PS1

I have put the following in my ~/.localsh file to customize my bash prompt when working with git. Basically I want to get the current branch displayed in my terminal. The gitk tool shows branches with green background and black foreground, so thats what I’m trying to do. What I have works, but when I […]

Git: Renaming files with EGit causes deletion of file history

I use Eclipse EGit plugin to work with git repository. (I even use it for local projects to track changes made by tools.) However I discovered problem that makes usage for team projects not so good: When renaming a folder or file, I get to commits 2 items: 1 to add as new, and 1 […]

Powershell Git Hook Exit Code

I have the following in my .git/hooks/pre-commit file #!/bin/sh exec c:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -ExecutionPolicy RemoteSigned -Command ” Get-Location | % { ‘$_\pre-commit-hook.ps1’} | % { & $_ }” exit This successfully executes the code in the pre-commit-hook.ps1 file in the same directory, but does not capture the exit code. According to tldp.org the last exit code will […]

Move git configuration from Windows to Ubuntu

I recently started using git on windows 7 and configured everything to access Github, Bitbucket and a private server over ssh. Now I am switching to Ubuntu OS and I am not sure how to copy the keys and configuration settings over to Ubuntu. Will you please help me out or point me in the […]

Docker: How to access to a private github repo using ssh?

I’m trying to clone a private repo from github using Docker. The problem is that I need to use ssh to access to that repo. I added a key in my github project’s setting which is used, I suppose, to identify the docker‘s server. My problem is that I can’t figure out what I should […]

move my global .gitconfig file

Possible Duplicate: Changing .gitconfig location I am a bit of a git newb so I am sure this must be simple, just eluding me. On my work laptop my %homedrive% and %homepath% are set to a network home share. By default git is looking there for my .gitconfig file. This is no good for when […]

Eclipse Neon eGit Integration gives Exception 401 Authorization Required

After upgrading to Neon my Egit integration has failed with the following Exception UPDATE: See eclipse bug i.errors.TransportException: https://github.com/[REPOSITORY]/SCA: 401 Authorization Required at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:169) at org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:217) at org.eclipse.egit.ui.internal.push.PushOperationUI.execute(PushOperationUI.java:167) at org.eclipse.egit.ui.internal.push.PushOperationUI$1.run(PushOperationUI.java:229) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: org.eclipse.jgit.errors.TransportException: https://github.com/SCASoftware/SCA: 401 Authorization Required at org.eclipse.jgit.transport.TransportHttp$Service.openResponse(TransportHttp.java:855) at org.eclipse.jgit.transport.TransportHttp$MultiRequestService.execute(TransportHttp.java:956) at org.eclipse.jgit.transport.TransportHttp$Service$HttpExecuteStream.read(TransportHttp.java:882) at org.eclipse.jgit.util.io.UnionInputStream.read(UnionInputStream.java:145) at java.io.FilterInputStream.read(Unknown Source) at org.eclipse.jgit.util.io.TimeoutInputStream.read(TimeoutInputStream.java:112) at org.eclipse.jgit.util.IO.readFully(IO.java:247) at […]

git-tfs: A shelved pending change on a file is required

I’m trying out git–tfs, and I’m trying to unshelve a shelveset by running the following: git tfs unshelve “Shelveset Name” shelf I’m getting the following error: A shelved pending change on a file is required: $/path/to/dir/deleted “deleted” is a directory that was deleted in the shelveset. I’m only just starting with git-tfs. I need to […]

Using git for a large website

I am looking for some advice on how to use git for a website with a lot of html content. We have 2 content managers that do basic html coding and upload their work to the server. I am the only developer. The site is pretty equally divided between 2 types of content. First is […]

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