Git – remote: error: cannot run hooks/post-receive: No such file or directory

I get the error : remote: error: cannot run hooks/post-receive: No such file or directory When trying to push to remote. The post-receivce file exists in the correct location (testnew.git/hooks) and contains: #!/bin/bash2 export GIT_DIR=/var/www/testnew/testnew/.git/ export GIT_WORK_TREE=/var/www/testnew/testnew/ cd /var/www/testnew/testnew/ echo “here we go…” git fetch git merge origin/master git submodule update –init –recursive I’ve tried […]

Pushing only one folder to remote repo

I’m using Git 1.7.4.1. I want to push commits I did on one folder to my remote repo. How do I push only changes from one folder to my remote repo? All the documentation I’ve found only lists how to push the entire repo … davea-mbp2:systems davea$ git push origin trunk Password: To http://dalvarado@mydomain.com/systems.git ! […]

How to update topic branch with upstream changes on master?

I start some work on a topic branch •-•-• < topic / •-• < master I push the topic branch $ git push origin topic Someone else pushes changes to master •-•-• < origin/topic / •-•-•—• < origin/master How do I update my local master and rebase my topic? History should look like this •-•-• […]

How do I rebase a chain of local git branches?

Suppose I have a chain of local git branches, like this: master branch1 branch2 | | | o—-o—-o—-A—-B—-C—-D I pull in an upstream change onto the master branch: branch1 branch2 | | A—-B—-C—-D / o—-o—-o—-o | master Now I rebase branch1, giving me this: branch2 | A—-B—-C—-D / o—-o—-o—-o—-A’—B’ | | master branch1 Note that […]

Unable to modify git bash Windows shortcut

Under Windows 7 I’d like to change the settings for the Git Bash Here shell extension command window, e.g. width, height and font. But when I do this, I get an error “Unable to modify the shortcut”. I can modify the shortcut for Git Bash in the Start menu by using “Run as administrator…” This […]

When should I use git stash?

If I work on branch A and suddenly need to work on branch B before being ready with a commit on branch A, I stash my changes on A, checkout B, do my work there, then checkout A and apply the stash. If I work on A and I want to stop working for the […]

Best practice for using multiple .gitignore files

There exists a collection of useful .gitignore files at https://github.com/github/gitignore. Every ignores file there has an extension .gitignore, e.g. Java.gitignore, vim.gitignore. When I put these files directly into a workdir, they don’t work. Is it necessary to create a single file .gitignore and merge the constituent files into it? Accordingly, when using a –global .gitignore […]

Shortcuts for git commands

I would like to use shortcuts or aliases for git commands. git diff git status git push git pull git stash git branch -a How do I create shortcuts or aliases, is there a predefined list?

Git for Mac fails to launch: “illegal instruction”

…I’ve looked pretty carefully (I believe), and have been unsuccessful at getting an installation of Git for my Mac. For various reasons, I’m running 10.6.8 of Mac OS X and will not be changing that anytime soon. I’ve already gathered and installed the bundle exposed here: https://help.github.com/articles/set-up-git The installation instructions are pretty clear, and it’s […]

Git clone verbose mode – show each incoming object

I’m wondering that git clone –verbose is not very verbose. The output of executing the command is the following: $ git clone –verbose <repo> remote: Counting objects: 184, done remote: Finding sources: 100% (184/184) remote: Total 184 (delta 66), reused 183 (delta 66) Receiving objects: 100% (184/184), 18.90 KiB, done. Resolving deltas: 100% (66/66), done. […]

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