git-clone and post-checkout hook

According to the manual, the post-checkout hook is run after a git checkout (just as expected) but also after a git clone (unless you pass –no-checkout). Very well, now, considering the following: you don’t have a local repository before a git clone hooks are not synced between remotes hooks stored in a custom template directory […]

Jenkins Git Plugin: How to build specific tag?

I am having issues getting Jenkins to build a specified tag. The tag is part of a parametrized build, but I do not know how to pass this through to the git plugin to just build that tag. This has been taking 3 hours of my day and I have conceded defeat to the masters […]

cannot push into git repository

This is what I have done so far and I will say this procedure worked on Ubuntu 9.10 which perhaps had a different version of git. server: mkdir ~/git local: scp -r /../project server: cd git cd project git init git add . git commit -a -m “initial” local: git clone /home/name/project cd […]

How do I run git rebase –interactive in non-interactive manner?

Is it possible to do following? Make git rebase –interactive to just output standard boilerplate to a file, instead to outputting to a file and opening it in editor. Let the user edit the file. Let user re-run git rebase with the name of edited file. Go on with the usual rebase process. Usecase: scripted […]

Send a pull request on GitHub for only latest commit

I forked a project on github and am successfully making changes to my local master and pushing to origin on github. I want to send a pull request, but only want to include the last commit. The pull request UI on shows the last 9 commits and I don’t know how to filter that […]

How to commit no change and new message?

How can I make a new commit and create a new message if no changes are made to files? Is this not possible since the commit’s code (SHA ?) will be the same?

Best practices for cross platform git config?

Context A number of my application user configuration files are kept in a git repository for easy sharing across multiple machines and multiple platforms. Amongst these configuration files is .gitconfig which contains the following settings for handling the carriage return linefeed characters [core] autocrlf = true safecrlf = false Problem These settings also gets applied […]

What's the difference between Git ignoring directory and directory/*?

I’m confused about what’s the correct way to ignore the contents of a directory in git. Assume I have the following directory structure: my_project |–www |–1.txt |–2.txt |–.gitignore What’s the difference between putting this: www And this? www/* The reason I’m asking this question is: In git, if a directory is empty, git won’t include […]

How can I move a single directory from a git repository to a new repository whilst maintaining the history?

I have inherited a git repository containing multiple projects in separate directories. I’d like to split the repository into new individual repositories, one for each project and then have the master repository contain the projects as submodules. I’d like to do all this whilst maintaining the revision history of the individual projects if possible. I […]

How to apply unmerged upstream pull requests from other forks into my fork?

A project on GitHub that I have a fork of has a new pull requests that I want to pull into my fork that the author has not pulled in yet. Is there a simple way to apply pull request from other forks into my fork? Is there something else here that I am missing?

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