- Make sure you have a Terminal / CLI (Command Line Interface)
- If using windows, we recommend using Git Bash
- Check if Git is installed in your computer
- Open CLI and type
$ git --version
- Open CLI and type
- Create an account on Github
- Make sure you have a code editor
- We recommend VS Code
Syntax | Command |
---|---|
$ git config |
Sets up your local github identity |
$ git init |
Turns an existing directory into a git repository |
$ git clone [url] |
Clones a repo from url |
$ git add -A |
Stages all changes made on the curren repo (diff between -a and .?) |
$ git commit -m "message" |
Commits the previously added changes, getting them ready to push |
$ git push |
Pushes the commited changes to the remote branch (origin) |
$ git pull |
Pulls all changes locally to keep your repo updated with the remote |
$ git branch |
Shows the user all the existing branches |
$ git checkout -b [newBranch] |
Creates and switches to a new branch called newBranch |
$ git status |
Shows the working tree status |
$ git reset |
Resets current HEAD to the specified state |
$ git rebase |
Reapply commits on top of another base tip |
- Brief explanation of Github Desktop vs using Git from command line
- Setup account locally by using
git config
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
$ git config --global init.defaultBranch main
- Command Line
- cd / ls / pwd / cd ..
git --version
(install git prompt)
- Create first repo from website
- Create on website with readme
- Clone locally
- Create repo from existing directory
- Create on website without readme
git init
locally
- Make your first commit/push
- Can also edit directly on repo website
- Forks
- Pull requests
- Fork original Dariusk's Corpora to ITP Residents
- Fork the ITP Residents' corpora repo to your own account
- Clone your own corpora repo to your machine
- Open the repo on your code editor
- You can create a category or add new data to any
- Commit the changes to your personal fork of the repo
- Pull request your personal fork to the ITP Residents' fork
- We will accept changes in real time