Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 40 additions & 44 deletions README → README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
##########
# BASICS #
##########

To make changes:
# Improve your git skills the cool way

# BASICS

### To make changes:

git add path/to/file1 path/to/file2
git commit -m "templates: Changed the XX template to do XX"

To push that to the central server (which makes it available for deployment):
### To push that to the central server (which makes it available for deployment):

git push

To revert a file to its state in the repository:
### To revert a file to its state in the repository:

git checkout path/to/file_that_has_changed

To get the latest code changes:
### To get the latest code changes:

git pull --rebase

#############################
# REMOTE BRANCHES: YOUR OWN #
#############################

# REMOTE BRANCHES: YOUR OWN

We use remote tracking branches for branching.

To create a tracking branch called "ajax_fallback":
### To create a tracking branch called "ajax_fallback":

git checkout -b ajax_fallback
git push -u origin ajax_fallback

To push changes in this branch:
### To push changes in this branch:

git push

Expand Down Expand Up @@ -60,11 +60,11 @@ To push changes in this branch:
git checkout ajax_fallback
git push

To pull changes that other people have made to this branch (do not use rebase!):
### To pull changes that other people have made to this branch (do not use rebase!):

git pull

To pull changes that have been made to master (do not use rebase!):
### To pull changes that have been made to master (do not use rebase!):

git merge master
git push
Expand All @@ -73,7 +73,7 @@ To pull changes that have been made to master (do not use rebase!):

git pull

To see the full diff of what's changed in this branch:
### To see the full diff of what's changed in this branch:

git checkout master
git diff master ajax_fallback
Expand All @@ -92,79 +92,75 @@ When you're ready to merge the branch back into master:
git branch -d ajax_fallback
git push origin :ajax_fallback

To delete a branch without merging it back into master:
### To delete a branch without merging it back into master:

git checkout master
git branch -D ajax_fallback
git push origin :ajax_fallback

###################################
# REMOTE BRANCHES: OTHER PEOPLE'S #
###################################

To check out the branch somebody else has created:
# REMOTE BRANCHES: OTHER PEOPLE'S


### To check out the branch somebody else has created:

git checkout --track origin/ajax_fallback

To push changes in this branch:
### To push changes in this branch:

git push

To pull changes that other people have made to this branch (do not use rebase!):
### To pull changes that other people have made to this branch (do not use rebase!):

git pull

To pull changes that have been made to master (do not use rebase!):
### To pull changes that have been made to master (do not use rebase!):

git merge master
git push

To see the full diff of what's changed in this branch:
### To see the full diff of what's changed in this branch:

git checkout master
git diff master ajax_fallback

##################
# LOCAL BRANCHES #
##################

# LOCAL BRANCHES

Generally all of our branches are remote, but if you want to create a local one,
a few things are different -- namely to use "git rebase master" when you pull
changes from master.

To create the branch:
### To create the branch:

git checkout -b ajax_fallback

To pull changes that have been made to master:
### To pull changes that have been made to master:

git rebase master

################
# VIEWING INFO #
################

To view which branch you're on:
# VIEWING INFO


### To view which branch you're on:

git status

To view all branches, including remotes:
### To view all branches, including remotes:

git branch -a

To view all branches, with information about whether they're tracking/remotes:
### To view all branches, with information about whether they're tracking/remotes:

git remote show origin

################
# USEFUL LINKS #
################

GitHub Git cheat sheet
http://help.github.com/git-cheat-sheets/
# USEFUL LINKS


[GitHub Git cheat sheet](http://help.github.com/git-cheat-sheets/)

Why do we use --rebase when pulling on master?
http://gitready.com/advanced/2009/02/11/pull-with-rebase.html
[Why do we use --rebase when pulling on master?](http://gitready.com/advanced/2009/02/11/pull-with-rebase.html)

Remotes
http://progit.org/book/ch3-5.html
[Remotes](http://progit.org/book/ch3-5.html)
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-modernist