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

Merging experiments #1

Merged
merged 5 commits into from
Jul 7, 2021
Merged
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
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