Tag: bash

How do I exit my git commit message? I'm NOT in the VIM, I used the “ commit -m ” command

I was trying to commit a message and I accidentally made a typo: ‘git commit -m ‘Deleted old Basic Syntax chapter README’ Now i’m stuck in the terminal, and all it shows is: > > > > >asdfasdfad > >asd > How do I exit out of this, but still keep my commit message? I’m […]

Autocomplete git in mac OS not working?

I am using git in mac. I am trying to have the autocomplete feature. I followed these steps (http://www.codethatmatters.com/2010/01/git-autocomplete-in-mac-os-x/) but I get this error, any idea? : command not found –bash: /Users/me/git-completion.bash: line 80: syntax error near unex’ected token in -bash: /Users/me/git-completion.bash: line 80:case “$COMP_WORDBREAK’” in

Getting a list of all unversioned files in a Git-controlled folder

Getting a list of unversioned files in a Git-controlled folder is way more annoying than it needs to be. Unless I really suck at reading man pages, it doesn’t look like Git provides a facility to perform this operation on its own. There may be a more elegant way of performing this, but here’s a […]

how to escape special characters in .gitconfig proxy authentication

I’m trying to use git behind a proxy and i have set up the proxy details in the .gitconfig files as follows. [http] proxy = http://<username>:<password>@<proxy_ip>:<proxy_port> The problem is that the username and password field contain the ‘@’ character which needs to be escaped.How should it be escaped?

Git export files as zip/tar since specified commit till today

So I want to export all files starting from specific commit id till today (which may include subsequent commits), so I am doing this: git diff-tree -r –no-commit-id –name-only –diff-filter=ACMRT $commitId | xargs tar -rf output.tar However, it seems this outputs file only that were modified in specified commit id ($commitId). What I am looking […]

How do I pass an absolute path to the adb command via git bash for windows?

I’m trying to pass a unix style path to the Android adb command using a git bash (msysgit) but the shell is interpreting my path incorrectly. This is what I’ve tried so far: $ adb push myfile /mnt/sdcard/ failed to copy ‘myfile’ to ‘C:/Program Files (x86)/Git/mnt/sdcard/’: No such file or directory $ adb push myfile […]

git bash auto complete slow on windows 7 x64

I have two machines where git bash auto complete is agonizingly slow. When I hit tab, it can take 8 to 10 seconds for the filename to be completed. This only seems to happen when the auto complete is part of a git command. Auto complete for cd works fine. The actual execution of the […]

Better way of getting a GIT commit message by short hash?

Hey guys I’m currently getting my commit message for a certain commit hash by using this below hash=’b55da97′ git log –pretty=oneline ${hash} | grep “${hash}” | awk ‘{ print $2 }’ These seems extremely inefficient though, is there a smarter cheaper way to do this, or am I stuck with grepping and awking?

Errors in dumping a remote Git based SVN repository over HTTP

I’m running into several errors trying to clone/mirror a GitHub repo. I’ve tried doing this over HTTPS locally, or server to server (so I can hotcopy it back into our SVN server repo). The BASH script I’m using that should dump the repo fails with these errors: $ svnsync init file:///home/jdaniel/www/clone/rest https://github.com/ehime/Restful-MVC-Prototype svnsync: E125005: Wrong […]

How to set current date as git commit message

How to set current date as git commit message?

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