Maintaining a set of small changes not to be committed to SCM

I’m using git, but I’ll be glad to hear answers relevant to other SCMs. I’m having a few small changes which are relevant just for me (using a different build scheme, relevant only for my configuration), and I really need to have them. The right thing to do is of course, merge it into the […]

Git Push to Heroku, receiving “Invalid RUBY_VERSION specified:”

I’m trying to push an app to heroku using “git push heroku master”. In my Gemfile, I have the following: source ‘https://rubygems.org’ ruby ‘ruby 1.9.3’ gem ‘foreman’ but when I try to push to heroku, I get the following error: ! Invalid RUBY_VERSION specified: Gemfile-syntax-error:-<!DOCTYPE-html>-^-/tmp/build_o93twnijmxig/Gemfile:5:-syntax-error,-unexpected-‘<‘-<html>-^-/tmp/build_o93twnijmxig/Gemfile:7:-syntax-error,-unexpected-‘<‘-<meta-charset=’utf-8’>-^-/tmp/build_o93twnijmxig/Gemfile:8:-syntax-error,-unexpected-‘<‘-<meta-http-equiv=”X-UA-Compatible”-content=”IE=edge”>-^-/tmp/build_o93twnijmxig/Gemfile:8:-syntax-error,-unexpected-tIDENTIFIER,-expecting-$end-<meta-http-equiv=”X-UA-Compatible”-content=”IE=edge”>-^ ! Valid versions: ruby-1.9.3-p0, ruby-1.9.3-p125, rbx-1.2.4, rbx-2.0.0dev-20120115-1.9, rbx-2.0.0dev-20120115-1.8, rbx-2.0.0dev-20120123-1.9, rbx-2.0.0dev-20120123-1.8, […]

How can I verify git clone is working correctly?

I’m following the documentation provided here by git to setup a bare git repository in a folder called root. I started in the root directory where I ran git init git -A * git commit -m “test” I then ran git status and all appears good. Next I ran the line from the documentation at […]

Get GitHub username from commit history

I cloned a repo to my machine, and did git log but in the logs, it shows the persons full name and email, rather than their github username. Is there a way to associate the commits to a user without relying on GitHub’s website?

Git – Constructing a new branch from various selected commits on master

I need to release only certain stories that have passed QA. I don’t have access to the branches, only the master branch. There will be another release in two weeks, so I was thinking of just creating a ‘dead-end’ release branch and that I need to start this branch from the commit just prior to […]

How to determine whether a git pull did something from a shell script

I run a script on login that opens a terminal and runs a shell script in it that reads git pull –rebase && git log However, this git log will run even if there were no changes upstream. How can I modify this script to only run the git log if there were changes?

How to get the latest head name in current branch in Git?

For example, in a git worktree of Linux Kernel. $ git checkout v2.6.6 $ git checkout v3.3 How to find the last head name or HASHID in current branch v3.3? In the example above, it should get v2.6.6 or the HASHID for v2.6.6. Thanks.

Restore previously removed code (not necessarily single or whole file) in git

I removed a class a feature from my code a while back and committed the removal. The feature was implemented as a single class with a BDD-style spec and a few other classes were altered in the removal commit as they made use of the feature. The commit is clean, in that the only change […]

does git amend require a git push -f?

make changes git commit ‘made changes’ -a git push origin make more changes git ammend -a git push origin I’ve noticed that when I do a git commit –ammend -a and then try to push to a remote repo, it requires that I force the push (git push -f). My guess is because it’s trying […]

Can I gitignore files with a prefix?

I have file a.css and b.css in the same folder. My framework combines those files in a file called temp.a12cab4598347b07f0079d.css This file will be generated wherever there is a css file, so folder matching is no good. Can I ignore all these files using something like temp.*.css Thank you

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