- Installation
http://git-scm.com/downloads
- Windows installation: Accept all defaults
- Setup
- Identity
$ git config --global user.name "Brian Jesse"
$ git config --global user.email [email protected]
- Configuration Files
~/.gitconfig
- Identity
- Cloning
git clone http://github.com/bajesse/git-workshop.git
cd git-workshop
- Checkout a branch
git checkout dev
- Create a feature branch
git checkout -b my-feature
- Modify files
- Check the status
git status
- Stage files
git add index.html
git add style.css
git status
- Commit staged changes
git commit -m 'my message
- Check the log
git log
- Merge into devel
git checkout dev
git merge my-feature
- Demonstration of push
- Create a release branch
git checkout -b release-1
- Modify branch with bugfixes and commit to release
- Merge into master and dev
git checkout master
git merge release-1
git push origin master
git checkout dev
git merge release-1
git push origin dev
- Tagging the release
git checkout master
git tag 1.0
- Managing hotfixes
- the same as a release branch, but it is branched from master and merged back to dev and master
- Merge conflict resolution
- Git will create a new commit when merge conflicts occur
- Any files that now have merge conflicts will have resolution markers in them
- Git will also add local, remote, and base versions of the file for you to diff against
- When you are satisfied with the merge run
$ git add <filename>
$ git commit
- The mergetool may come in handy
$ git config --global merge.tool vimdiff
$ git mergetool
- Other concepts
git help
- Creating new repositories with
git init
- Ignoring files with
.gitignore
git stash
andgit stash pop
- Adding/removing remote repositories
- Resources
- Pro Git (Book)
- Free online
http://git-scm.com/book
- Free online
- Try git online
- Git Immersion
- Check out the presentation
- Git Branching Model
- Pro Git (Book)
-
Notifications
You must be signed in to change notification settings - Fork 1
BrainBacon/git-workshop
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
An introduction to Git
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published