Questions tagged [grit]

A rubygem that allows OO access to git repositories.

grit in it's own words:

Grit gives you object oriented read/write access to Git repositories via Ruby. The main goals are stability and performance. To this end, some of the interactions with Git repositories are done by shelling out to the system's git command, and other interactions are done with pure Ruby reimplementations of core Git functionality. This choice, however, is transparent to end users, and you need not know which method is being used.

Certain parts of grit rely on the git binary, others are implemented in pure ruby. The distinction between the two is contained here.

35 questions
0
votes
0 answers

Same file in modified and added files in git status

I have ruby console application which is using grit gem to manipulate git repositories on MacOS. When call that application from git folder I want to edit, and edit some files, that files will appear in modified as well as in added files in git…
amilanov
  • 1
  • 1
0
votes
1 answer

grit equivalent of git diff

I am trying to find all the lines of code within the current git diff that have been deleted (in the unstaged changes) using the ruby gem grit, i.e. I want to see all the unstaged changes involving deletions. This would be the equivalent of doing…
polpetti
  • 787
  • 7
  • 21
0
votes
0 answers

how to use Push in grit using method_missing method

I am trying to do push using grit.. however I am unable to figure out what all parameters are to be passed in rmpush.push command below.. I have already created a remote alias using git remote add and its working fine. location = 'D:\GritRepo' repo…
Ahmad Osama
  • 91
  • 1
  • 11
0
votes
1 answer

Ruby Grit: find commits between 2 branches

I would like to compare 2 branches and show the commits that exist in one but not the other. This works from command line git log --pretty=oneline branch_b ^branch_a --no-merges and gives me what I want but I would like to simulate the same thing in…
Adam
  • 1,561
  • 2
  • 15
  • 25
0
votes
2 answers

Grit: how to to tell between two commits which is newer?

I'd like to be able to tell between two Grit::Commit objects, which is newer. What I mean by newer is that if commit_A is a parent (or parent of a parent,etc) of commit_B, then commit_B is newer. This assumes that commit_A and commit_B are on the…
Ben
  • 173
  • 1
  • 14
1 2
3