From 8f5f1240eb14919deed89c54f0b322bc11e1469c Mon Sep 17 00:00:00 2001 From: Heather Fenton Date: Thu, 8 Oct 2015 19:18:07 -0400 Subject: Git: Add Git Immersion tutorial as a resource --- git.html.markdown | 2 ++ 1 file changed, 2 insertions(+) (limited to 'git.html.markdown') diff --git a/git.html.markdown b/git.html.markdown index b1347309..72079f6c 100644 --- a/git.html.markdown +++ b/git.html.markdown @@ -484,6 +484,8 @@ $ git rm /pather/to/the/file/HelloWorld.c * [Udemy Git Tutorial: A Comprehensive Guide](https://blog.udemy.com/git-tutorial-a-comprehensive-guide/) +* [Git Immersion - A Guided tour that walks through the fundamentals of git](http://gitimmersion.com/) + * [git-scm - Video Tutorials](http://git-scm.com/videos) * [git-scm - Documentation](http://git-scm.com/docs) -- cgit v1.2.3 From 93ced538e3e426b810bc2d4e621eae231c9515c4 Mon Sep 17 00:00:00 2001 From: Bruno Volcov Date: Tue, 13 Oct 2015 11:26:26 -0300 Subject: add documentation about git tags --- git.html.markdown | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'git.html.markdown') diff --git a/git.html.markdown b/git.html.markdown index 72079f6c..971d53e4 100644 --- a/git.html.markdown +++ b/git.html.markdown @@ -5,6 +5,7 @@ contributors: - ["Jake Prather", "http://github.com/JakeHP"] - ["Leo Rudberg" , "http://github.com/LOZORD"] - ["Betsy Lorton" , "http://github.com/schbetsy"] + - ["Bruno Volcov", "http://github.com/volcov"] filename: LearnGit.txt --- @@ -76,6 +77,11 @@ other repositories, or not! A branch is essentially a pointer to the last commit you made. As you go on committing, this pointer will automatically update to point the latest commit. +### Tag + +A tag is a mark on specific point in history. Typically people use this +functionality to mark release points (v1.0, and so on) + ### HEAD and head (component of .git dir) HEAD is a pointer that points to the current branch. A repository only has 1 *active* HEAD. @@ -206,6 +212,28 @@ $ git branch -m myBranchName myNewBranchName $ git branch myBranchName --edit-description ``` +### tag + +Manage your tags + +```bash +# List tags +$ git tag +# Create a annotated tag +# The -m specifies a tagging message,which is stored with the tag. +# If you don’t specify a message for an annotated tag, +# Git launches your editor so you can type it in. +$ git tag -a v2.0 -m 'my version 2.0' +# Show info about tag +# That shows the tagger information, the date the commit was tagged, +# and the annotation message before showing the commit information. +$ git show v2.0 +# Push a single tag to remote +$ git push origin v2.0 +# Push a lot of tags to remote +$ git push origin --tags +``` + ### checkout Updates all files in the working tree to match the version in the index, or specified tree. -- cgit v1.2.3 From c613e3bc6a3c59214faaa6e6273cb98ab8a97c1d Mon Sep 17 00:00:00 2001 From: Romin Irani Date: Sun, 18 Oct 2015 06:19:24 +0530 Subject: Added Git and Github Tutorial Link --- git.html.markdown | 3 +++ 1 file changed, 3 insertions(+) (limited to 'git.html.markdown') diff --git a/git.html.markdown b/git.html.markdown index 72079f6c..e9d62b69 100644 --- a/git.html.markdown +++ b/git.html.markdown @@ -499,3 +499,6 @@ $ git rm /pather/to/the/file/HelloWorld.c * [Git - the simple guide](http://rogerdudler.github.io/git-guide/index.html) * [Pro Git](http://www.git-scm.com/book/en/v2) + +* [An introduction to Git and GitHub for Beginners (Tutorial)](http://product.hubspot.com/blog/git-and-github-tutorial-for-beginners) + -- cgit v1.2.3 From 670e71c4990aefe739f108e15bf707eaf795f922 Mon Sep 17 00:00:00 2001 From: Chris54721 Date: Sun, 18 Oct 2015 13:47:03 +0200 Subject: [git/en] Fixed 'git pull' documentation While translating git.html.markdown to Italian, I found a mistake: `git pull` does not default to `git pull origin master`. By default, it updates the current branch by merging changes from its remote-tracking branch. --- git.html.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'git.html.markdown') diff --git a/git.html.markdown b/git.html.markdown index f678f9d1..ed9aec15 100644 --- a/git.html.markdown +++ b/git.html.markdown @@ -371,9 +371,12 @@ Pulls from a repository and merges it with another branch. # Update your local repo, by merging in new changes # from the remote "origin" and "master" branch. # git pull -# git pull => implicitly defaults to => git pull origin master $ git pull origin master +# By default, git pull will update your current branch +# by merging in new changes from its remote-tracking branch +$ git pull + # Merge in changes from remote branch and rebase # branch commits onto your local repo, like: "git pull , git rebase " $ git pull origin master --rebase -- cgit v1.2.3 From 6d20f58cbd3022fb8990ace8f88f8f4c15591a88 Mon Sep 17 00:00:00 2001 From: Chris54721 Date: Sun, 18 Oct 2015 13:54:06 +0200 Subject: [git/en] Fixed 'git push' documentation The 'git push' documentation had the same problem of the 'git pull' one I just fixed. --- git.html.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'git.html.markdown') diff --git a/git.html.markdown b/git.html.markdown index ed9aec15..bedc9853 100644 --- a/git.html.markdown +++ b/git.html.markdown @@ -390,9 +390,12 @@ Push and merge changes from a branch to a remote & branch. # Push and merge changes from a local repo to a # remote named "origin" and "master" branch. # git push -# git push => implicitly defaults to => git push origin master $ git push origin master +# By default, git push will push and merge changes from +# the current branch to its remote-tracking branch +$ git push + # To link up current local branch with a remote branch, add -u flag: $ git push -u origin master # Now, anytime you want to push from that same local branch, use shortcut: -- cgit v1.2.3 From a4842767094537dfee57698edc3bcc2b74f1ecee Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 30 Oct 2015 19:58:33 +0000 Subject: Adds documentation for revert command Also mentions graph flag for the log command --- git.html.markdown | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'git.html.markdown') diff --git a/git.html.markdown b/git.html.markdown index bedc9853..e7ca07d6 100644 --- a/git.html.markdown +++ b/git.html.markdown @@ -6,6 +6,7 @@ contributors: - ["Leo Rudberg" , "http://github.com/LOZORD"] - ["Betsy Lorton" , "http://github.com/schbetsy"] - ["Bruno Volcov", "http://github.com/volcov"] + - ["Andrew Taylor", "http://github.com/andrewjt71"] filename: LearnGit.txt --- @@ -333,6 +334,9 @@ $ git log --oneline # Show merge commits only $ git log --merges + +# Show all commits represented by an ASCII graph +$ git log --graph ``` ### merge @@ -499,6 +503,16 @@ $ git reset 31f2bb1 # after the specified commit). $ git reset --hard 31f2bb1 ``` +### revert + +Revert can be used to undo a commit. It should not be confused with reset which restores +the state of a project to a previous point. Revert will add a new commit which is the +inverse of the specified commit, thus reverting it. + +```bash +# Revert a specified commit +$ git revert +``` ### rm -- cgit v1.2.3