-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# General Flow/Commands for Version Control | ||
|
||
## Checking branches | ||
``` | ||
git status (shows your current branch) | ||
git branch (shows local branches) | ||
git branch -r (shows remote branches) | ||
git branch -a (shows all branches) | ||
``` | ||
|
||
## Creating + Switching to a branch | ||
|
||
``` | ||
git branch <branch name> (Creates the branch) | ||
git checkout <branch name> (Switches to the branch) | ||
``` | ||
|
||
## Pushing the branch to the git repository | ||
While on the branch: | ||
``` | ||
git add <changes> | ||
git commit -m "<commit message>" | ||
git push origin <branch name> | ||
``` | ||
|
||
## Making a Pull Request | ||
Go to Github -> Pull Requests -> New Pull Request -> Base: Main, Compare: Your Branch | ||
|
||
## Deleting a branch | ||
``` | ||
git branch -d <branch name> (Delete branch locally) | ||
git push origin --delete <branch name> (Delete branch remotely) | ||
``` | ||
|
||
|