vault backup: 2024-08-23 13:51:11

This commit is contained in:
Dane Sabo 2024-08-23 13:51:11 -04:00
parent 95c2b787d1
commit e0276601fa

View File

@ -55,4 +55,23 @@ git branch -M master # some people use "main"
git remote add origin git@github.com:danesabo/repository.git
git push -u origin master
```
## Working with branches
```bash
#Create a new branch
git branch new-branch
#switch to that branch
git checkout new-branch
#or do both at once
git checkout -b new-branch
#or even if you're in a newer git version
git switch -c new-branch
#push the new branch back to remote
git push -u origin new-branch
#git push (set new pushes to new branch spec) (remote destination) (branch name)
```