Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeline practise #85

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
35 changes: 32 additions & 3 deletions cheatsheet.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,54 @@
# Git Command Cheat Sheet

##### Cloning your remote directory
git clone <remote directory>
git clone <remote directory>

<<<<<<< HEAD
##### Checking that status of your local repository
git status

##### Pulling down all branches in a remote repo, not just the default branch
git fetch --all

=======
##### Checking that status of your local repository - shows changed but not added files in red
git status

>>>>>>> master
##### Creating a new branch for you to work on
git branch <new branch name>
git branch <new branch name>

##### See all branches in your remote repository
git branch -a

##### Moving onto a branch
git checkout <branch name>
git checkout <branch name>

##### Deleting a branch
git branch -d <branch name>

<<<<<<< HEAD
##### Moving your changes to the staging area
git add <file name>

##### Committing your changes
git commit -m '<commit message here>'

##### Pushing your commit to the remote repository
git push origin <branch name>

##### Creating a branch and moving onto it.
git checkout -b <new branch name>

##### Merging changes from another branch, to your current branch
git merge <branch you want to merge with your current branch>

##### Pulling remote changes into your local repo
git pull origin <branch name>
=======
##### Moving files while preserving git history
git mv <source> <destination>

##### Creates a branch, and moves you onto it AT THE SAME TIME
git checkout -b <new branch name>
>>>>>>> master
Empty file added css/stylesheet.css
Empty file.
Empty file added index.html
Empty file.
Empty file added js/script.js
Empty file.
1 change: 1 addition & 0 deletions time/newfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hey its my 3 time!