Skip to content

Commit

Permalink
adding version control markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
karnapp2 committed Jan 27, 2022
1 parent b40ed62 commit 05c2b90
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Version Control.md
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)
```


0 comments on commit 05c2b90

Please sign in to comment.