|
I added a file to the index with:
git add somefile.txt
I then got the SHA1 for this file with:
git hash-object somefile.txt
I now have a SHA1 and I would like to retrieve the filename of the object in the index using the SHA1.
git show 5a5bf28dcd79449...
Started by git-noob on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
There's no such direct mapping....
After that use
git ls-tree < options.
Tree commit subject ; do git ls-tree -r $tree | grep "$obj_hash" \ | while read a b hash filename ; doCommit the file and note the sha1 hash of the commit object.
|
|
I've been managing all of my todo-lists as
~/git-repo/todo
which is kept under git. THen I add/delete files from the todo list, and have git autocommit all changes. However, I feel there should be more powerful tools.
Besides "cil" and git-issues [neither...
Started by anon on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The author mentions....
Articles on the subject A few articles and blogposts about distributed issue tracking:
Offline Issue Tracking : A blog entry.
Half a year ago now.
Emacs org-mode ( http://orgmode.org ) + git if necessary.
I wrote my own.
|
|
A lot of people like git (in particular this guy ) against other SCMs such as SVN, but many projects, even new ones, are set up using alternative SCMs. Furthermore, Google Code still does not support it (although many of their large open source projects...
Started by Tom R on
, 26 posts
by 25 people.
Answer Snippets (Read the full thread at stackoverflow):
"....
However, I am sure Git would have been an excellent choice for me as well.
If a team doesn't know Git and actually doesn't need it (sounds like stating the obvious) because that it would be the easier to use with Codeplex projects.
|
Ask your Facebook Friends
|
Tim Pope argues for a particular git commit message style in his blog post: http://www.tpope.net/node/106
Here is a quick summary of what he recommends:
First line is 50 characters or less Then a blank line Remaining text should be wrapped at 72 characters...
Started by David James on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I don't believe users should use git one way....
Taking a look at the Linux Kernel Commits, the project that started git if you like, http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h.
For consistency.
|
|
Suppose I have a file "ChangeLog" in branch "master". I want to record information about all changes in any branch in this file (in more detail than in a commit message and with other descriptive information).
I git checkout -b revA , perform edits, update...
Started by themis on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Http://kernel.org/pub/software/scm/git/docs checkouts if test $isbranch -eq 0; then exit 0 fi path=ChangeLog git for-each-ref --sort=-committerdate \ --format='%(objectname) %(refname....
Commit hook to merge the file into the other branches .
|
|
Randal Schwartz says that he uses Git's SVN import/export feature when he has to interact with SVN repositories. He pulls the project from SVN, does all his local edits/saves with Git then once done pushes the changes back to the SVN repository. Is this...
Started by Jeremy Raymond on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
I get the following benefits:
lightweight local branching git add -p git stash ability to share patches....
Absolutely! I use Git as a Subversion client all the time at work (where our master repository is Subversion for other reasons).
|
|
I am installing msysgit 1.6.4 beta on my Win Vista development VPC. An install screen is requesting whether I want to use Unix line termination or DOS line termination. Ordinarily, I'd choose DOS, but the setup text indicates that DOS termination may ...
Started by Scott Davies on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
But with core.autocrlf set to false.
Core.autocrlf
If true, makes git++, ...) and Unix alike, and can be processed by any 'sh' Git-scripts.
Is actually here to fix the value of the core.autocrlf config .
|
|
I come from an SVN background so I'm not sure what the typical git workflow looks like. When you merge in SVN, you provide a commit message describing the merge. This is necessary because SVN's merge-tracking has historically been poor.
I noticed that...
Started by ThisSuitIsBlackNot on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
This is usually fine as git records the parentage of the commit and the interesting features of....
Unless you supply the --no-merges option to git log , it will normally show merges which are given a brief auto-generated commit description.
|
|
I am new to git and distributed version control but have managed, without much stumbling, to init my own local source, setup a private remote repository (origin) via ssh on my own web host, and do the basic pull and push from master to origin. (I even...
Started by thornomad on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I don't see a point in creating a overly complicated work flow here problems as each step is ... .
Git just makes doing so a little easier than some other version control systems, so you can use on the subject--it's pretty well written.
|
|
For a while now I've been using subversion for my personal projects.
More and more I keep hearing great things about Git and Mercurial, and DVCS in general.
I'd like to give the whole DVCS thing a whirl, but I'm not too familiar with either option.
What...
Started by TM on
, 9 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
subject to push.default configuration variable) "git push" or "git push < remote >" Git would two videos:
Linus Torvalds on Git ( http://www.youtube.com/watch?v=4XpnKHJAok8 )
Bryan O'Sullivan but very different....
|