Git: Finding what branch a commit came from
I'm pretty sure this isn't possible, but is there anyway to find out what branch a commit comes from given its sha1? Bonus points if you can tell me how to accomplish this using grit. :) ...
I'm pretty sure this isn't possible, but is there anyway to find out what branch a commit comes from given its sha1? Bonus points if you can tell me how to accomplish this using grit. :) ...
mkdir /tmp/scratch cd /tmp/scratch git init . --*-- xx.rb: SCRATCH = '/tmp/scratch' repo = Repo.new(SCRATCH) def add_multiple_commits_same_file_different_content(repo) previous_commit = repo.commits.first && repo.commits.first.id dir = "./" (0...5).each do |count| i1 = repo.index i1.read_tree('master') i1.add("#{dir...
I am having trouble trying to find out what files changed between two different commits. Here is the setup, version of Ruby and the Gem Grit, and what happens when I run the program: > cd /temp > mkdir tt > cd tt > git init Initialized empty Git repository in C:/temp/tt/.git/ > ruby --version ruby 1.8.7 (2010-01-10 patchlevel 249) [i386...
I'm trying to display some git version information (via grit) in my rails application footer for debuging. When I want to see the head, it's straightforward: @git_repository = Grit::Repo.new( Ter::Application.root ) head = @git_repository.heads.first t '.git_info', :revision => head.commit.id, :branch => head.name, :author => head.commi...