How-To-Git-Started/README.md

46 lines
912 B
Markdown
Raw Normal View History

2020-01-08 13:52:06 +01:00
# How to Git started
## Using a GUI
You can use any GUI for git, the ones we use are Fork and Sourcetree
You can download these at https://www.sourcetreeapp.com/ and https://git-fork.com/
2020-01-08 13:52:06 +01:00
## Set up git
Set up your git info
2020-01-08 13:55:14 +01:00
```shell
2020-01-08 13:52:06 +01:00
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
```
If you want to save your https credentials run
2020-01-08 13:55:14 +01:00
```shell
2020-01-08 13:52:06 +01:00
git config --global credential.helper store
2020-01-08 13:54:15 +01:00
Omit --global to set the identity only in this repository.
2020-01-08 13:52:06 +01:00
```
2020-01-08 14:03:33 +01:00
## Saving changes
unstage by using
```shell
use "git reset HEAD <file>..." to unstage
```
2020-01-08 14:52:55 +01:00
Track remote branch
```shell
git checkout --track origin/<branch>
```
Delete remote branch
```shell
git push <remote_name> --delete <branch_name>
git remote prune <remote_name>
```