top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Given object file in Git, determine its path, or at least, its contents

0 votes
20 views

I have a brand new, large file in my repository. I know that its object file is:

.git/objects/87266d373359958e4fa9b51808ae076db9303923

I would like to determine the path name it has (and in which commit). I would also like to be able to extract its file contents (somewhat like "git show" would do if I knew its path name).

I'm sure that there are Git commands to do both of these, but with Git manual pages, there's no way to find the command unless I already know its name.

posted May 16, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

To check the file content, you can use git cat-file -p 87266d373359958e4fa9b51808ae076db9303923

answer May 16, 2013 by anonymous
Similar Questions
+1 vote

How to configure a read-only copy of a remote Git repository on a local server in bare mode and automatically synchronize its contents.

I need to configure a mirror of the repository hosted at another location and the mirrored repository should automatically perform syncing of code at regular intervals.

+1 vote

I am new in git and I am trying to understand it.

I have this case:

a. I develop a html file in several days with daily commit.
b. Some weeks after I noticed that I lost part of the code.
c. I located a code 3 commits ago.

then how I can fetch from the remote repository the html file as was 3 commit before (the whole file)?

+1 vote

We're attempting to write some scripts to perform automatic commits for certain files under certain conditions. We wish to use the just committed revision number to perform some other logging operation. The --xml command line option on many of the other commands (info, status, etc.) are fantastic, but the commit command does not allow this.

I'm currently attempting to parse the standard output of the commit message to grab it, but feel this is less than optima as it seems very error prone.

Is there any consideration to add an --xml option to the commit command output or a better programmatic means to grab the commit revision?

$ svn commit 1.txt -m "Checkin message". 
Sending 1.txt 
Transmitting file data . 
Committed revision 3272. 
0 votes

I need to provide a list of all branches I have merged into develop since a given date.
Can you recommend a git command that will do this?


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...