[git-users] Access git objects
Is there any working tutorial for accessing git objects ? I found this on google http://githowto.com/git_internals_working_directly_with_git_objects but the first command git hist --max-object = 1 is not working . Any idea what is the actual command for git hist --max-object =1 ? -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Access git objects
That tutorial also have an aliases section at [1]. According to that, `git hist` is actually git log --pretty=format:%h %ad | %s%d [%an] --graph --date=short [1] http://githowto.com/aliases/ On 31 March 2014 12:06, Ashutosh Das areos...@gmail.com wrote: Is there any working tutorial for accessing git objects ? I found this on google http://githowto.com/git_internals_working_directly_with_git_objects but the first command git hist --max-object = 1 is not working . Any idea what is the actual command for git hist --max-object =1 ? -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Commit count in post-receive hook
Hi, first sorry for my english :p I try to deploy a web application when I push commit from my local to my bare repository. I use post-receive hook and want to create a file (not versionned) containing some revision informations. For this purpose, I launch the following commands in my post-receive hook : GIT_COMMAND=git --work-tree=${DEV_DEPLOYMENT_DIR} --git-dir=${GIT_DIR} $GIT_COMMAND checkout -f TAG=`$GIT_COMMAND tag | tail -1` HASH=`$GIT_COMMAND rev-parse --short HEAD` COMMIT=`$GIT_COMMAND shortlog | grep -E '^[ ]+\w+' | wc -l` echo v${TAG} ${COMMIT}-${HASH} $DEV_DEPLOYMENT_DIR/REV var TAG is correctly set (*eg 3.0.0, 3.0.1 ...*) var HASH is correctly set (*with last commit short hash*) var COMMIT isn't correctly set (*I always have 0*) After many searches, I don't understand why shortlog command doesn't work in my hook. I've tried to launch this command with my GIT user via SSH and I get the correct commit count. But in post-receive hook command always return 0. Can someone explain this to me plz ? Thanks. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Clone thinks origin has a removed branch
Hi, i think that prune it's what you are asking for, just like Konstantin explain to you: it removes locals refs to remotes branches that no longer exists, once they are removed they will not appear in your repo. 2014-03-31 1:19 GMT-03:00 Fredrik Linder fredrikelin...@gmail.com: 'git remote prune origin' removes local branches -- that's not my issue :-) Thank you though. My issue is that my local repo (clone1) has an incorrect view of my remote (origin), and I don't know to fix that -- beside messing with the internals or re-cloning it. Besides, this happens regardless if I have a local branch tracking the remote branch or not. I thought 'git fetch' (or any of the other previously mentioned commands) was supposed to do that, but it doesn't. /Fredrik -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Nelson Efrain A. Cruz - https://plus.google.com/106845325502523605960/about Debes ser el cambio que esperas ver en el mundo -Mahatma Gandhi -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Re: Access git objects
On Monday, March 31, 2014 12:06:38 PM UTC+2, Ashutosh Das wrote: Is there any working tutorial for accessing git objects ? I found this on google http://githowto.com/git_internals_working_directly_with_git_objectshttp://www.google.com/url?q=http%3A%2F%2Fgithowto.com%2Fgit_internals_working_directly_with_git_objectssa=Dsntz=1usg=AFQjCNGDZwefAOt7bGNv3isMh39fikQ0uw but the first command git hist --max-object = 1 is not working . Any idea what is the actual command for git hist --max-object =1 ? Maybe you'll find this presentation interesting: Git From the Bits Up, by Tim Berglund: http://vimeo.com/49478285 -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Re: Access git objects
Thanks Gergely and Ferris :) On Mon, Mar 31, 2014 at 7:39 PM, Thomas Ferris Nicolaisen tfn...@gmail.comwrote: On Monday, March 31, 2014 12:06:38 PM UTC+2, Ashutosh Das wrote: Is there any working tutorial for accessing git objects ? I found this on google http://githowto.com/git_internals_working_directly_ with_git_objectshttp://www.google.com/url?q=http%3A%2F%2Fgithowto.com%2Fgit_internals_working_directly_with_git_objectssa=Dsntz=1usg=AFQjCNGDZwefAOt7bGNv3isMh39fikQ0uw but the first command git hist --max-object = 1 is not working . Any idea what is the actual command for git hist --max-object =1 ? Maybe you'll find this presentation interesting: Git From the Bits Up, by Tim Berglund: http://vimeo.com/49478285 -- You received this message because you are subscribed to a topic in the Google Groups Git for human beings group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/git-users/8vdo9rIvEKk/unsubscribe. To unsubscribe from this group and all its topics, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] How do I find the branch of each parent of a merge commit?
Perhaps I should explain what I am trying to do. We have several project branches where developers commit their code (A project is a set of related features). The project branches are frequently merged to an integration branch where the code is compiled and then deployed from. (1 integration branch is created per release) If a project is pulled from the release and there is no way to simply disable it's code, we need to remove that code from the integration branch. Since removing code is a tedious process, we normally end up creating a new integration view and re-merging the remaining project branches to it which is a lot of re-work and time-consuming, thereby causing the project schedule to take a hit. GIT has a feature called rerere that records the conflict resolutions in a cache so that it can be later replayed. A few folks have written some scripts that make use of git rerere and several low level git commands to create a new integration branch and re-merge the remaining project branches to it (see links below) which is a pretty neat idea. However, if the script encounters a merge that came from a tag on a project branch it does not correctly exclude it, probably because the exclude parameter passed to the script accepts a branch name but the script uses git name-rev (on each of the parent's SHASUMs) to find out the name of the branch which returns the tag name instead of the branch where the tag was used to merged from. I need to find a way to make this work (i.e. pass project branch name to the script's --exclude parameter and rely on the script to exclude merged from it to the new integration branch. http://www.ivoverberk.nl/blog/2013/11/08/git-workflow-automated-branch-per-feature/ http://www.acquia.com/blog/pragmatic-guide-branch-feature-git-branching-strategy As you may be able to tell, I am fairly new to GIT and haven't played around it for long, so some of my assumptions may be incorrect. Feel free to point them out. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] How do I find the branch of each parent of a merge commit?
- Original Message - From: Alex Rodrigues To: git-users@googlegroups.com Cc: Alex Rodrigues ; Philip Oakley Sent: Monday, March 31, 2014 8:56 PM Subject: Re: [git-users] How do I find the branch of each parent of a merge commit? Perhaps I should explain what I am trying to do. We have several project branches where developers commit their code (A project is a set of related features). The project branches are frequently merged to an integration branch where the code is compiled and then deployed from. (1 integration branch is created per release) If a project is pulled from the release and there is no way to simply disable it's code, we need to remove that code from the integration branch. Since removing code is a tedious process, we normally end up creating a new integration view and re-merging the remaining project branches to it which is a lot of re-work and time-consuming, thereby causing the project schedule to take a hit. GIT has a feature called rerere that records the conflict resolutions in a cache so that it can be later replayed. A few folks have written some scripts that make use of git rerere and several low level git commands to create a new integration branch and re-merge the remaining project branches to it (see links below) which is a pretty neat idea. However, if the script encounters a merge that came from a tag on a project branch it does not correctly exclude it, probably because the exclude parameter passed to the script accepts a branch name but the script uses git name-rev (on each of the parent's SHASUMs) to find out the name of the branch which returns the tag name instead of the branch where the tag was used to merged from. I need to find a way to make this work (i.e. pass project branch name to the script's --exclude parameter and rely on the script to exclude merged from it to the new integration branch. http://www.ivoverberk.nl/blog/2013/11/08/git-workflow-automated-branch-per-feature/ http://www.acquia.com/blog/pragmatic-guide-branch-feature-git-branching-strategy As you may be able to tell, I am fairly new to GIT and haven't played around it for long, so some of my assumptions may be incorrect. Feel free to point them out. [I know the feeling tripping over the many ways of shooting your foo toof in Git] Try http://stackoverflow.com/questions/1419623/how-to-list-branches-that-contain-a-given-commit and http://stackoverflow.com/questions/1862423/git-how-to-tell-which-commit-a-tag-points-to which may gie you some ideas. You may have an XYProblem http://meta.stackoverflow.com/questions/66377/what-is-the-xy-problem -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.