User Tools

Site Tools


git:git_describe

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
git:git_describe [2016/11/21 14:07] petergit:git_describe [2019/11/29 15:01] (current) – removed peter
Line 1: Line 1:
-====== GIT - git describe ====== 
- 
-All this command does is show you the most recent annotated tag that is reachable from a commit.  This may be useful for build and release scripts and also to find out which version a change was introduced. 
- 
-This command takes a reference or commit hash and response with the most recent tag.  If there was a commit after the tag, the tag will be followed by the number of commits and a letter "g" with the new commit hash. 
- 
-<code git> 
-git init 
-Initialized empty Git repository in /home/john/Projects/git-stash-test/.git/ 
- 
-echo "bacon" > bacon.txt 
-git add bacon.txt 
-git commit -am "add bacon file" 
-[master (root-commit) 12da48f] add bacon file 
- 
-PETER CONTINUE from here... 
- 
- 
- 
- 1 file changed, 1 insertion(+) 
- create mode 100644 bacon.txt 
- 
-ls 
-bacon.txt 
- 
-echo "bits" >> bacon.txt 
-git stash 
-Saved working directory and index state WIP on master: 6d2649a initial commit  
-HEAD is now at 6d2649a initial commit 
- 
-git stash list 
-stash@{0}: WIP on master: 6d2649a initial commit 
- 
-git show stash@{0} 
-commit d152562d7dcbf7ebdf806977cae8308f1e7bb663 
-Merge: 6d2649a d5b0ce0 
-Author: John Smith <john.smith@gmail.com> 
-Date:   Wed Jul 22 02:26:34 2015 -0700 
- 
-   WIP on master: 6d2649a initial commit 
-    
-diff --cc bacon.txt 
-index 6e953b2,63953b2..b11453f 
---- a/bacon.txt 
-+++ b/bacon.txt 
-@@@ -1,1 -1,1 +1,2 @@@ 
-  bacon 
-++bits 
- 
-git log --oneline 
-6d2649a initial commit 
- 
-git branch 
-* master 
- 
-git fsck --lost-found 
-Checking object directories: 100% (256/256), done. 
- 
-git show-ref 
-6d2649ab6b3f34ecf5437314f08f9b291f8fb9e3 refs/heads/master 
-d152562d7dcbf7ebdf806977cae8308f1e7bb663 refs/stash 
-</code> 
  
git/git_describe.1479737220.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki