1. [Install Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) based on what operating system you have
2. [Add your identity](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) to your git environment. (If you use an email associated with your GitHub account your profile will show a heat map of your commit activity).
1. Open Terminal and navigate to where you stored mastodon (ex. `cd ~/Documents/mastodon`)
2. Type `git status` to see files you have modified or added.
3. We need to add those to the commit we're about to make and we can add them all at once with
```bash
git add .
```
4. We can commit everything to our local copy with
```
git commit -m "YOUR MESSAGE HERE"
```
You'll want to make your commit message something short, but meaningful as it's visible to everyone. A good example would be, "Added French localization".
5. Now you can push your changes to your remote copy of mastodon using
1. [Click this](https://github.com/tootsuite/mastodon/compare) to start a new pull request, or navigate to [Mastodon's GitHub Page](https://github.com/tootsuite/mastodon), click `Pull requests`, and `New pull request`
2. On the Compare Changes page you will want to click `compare across forks`
3. The base fork should be `tootsuite/mastodon:master` and the head fork should be `YOURUSERNAME/mastodon:YOURBRANCH`. This will show you a summary of changed files.
4. Click `Create pull request` and explain your changes.
Congratulations! Your pull request will be reviewed for merging into the repository.
If you had any questions or confusions during this process please submit a [documentation issue](https://github.com/tootsuite/documentation/issues) or [pull request](https://github.com/tootsuite/documentation/pulls) clarifying confusing areas.
If things get overwhelming, copy out your translation work, delete the project locally, remove the fork from your account, and start the process over again.
If you would prefer to not work in a Terminal, there are [GUI clients](https://git-scm.com/downloads/guis) available for git.
#### 3. Sychronize your `master` branch with Mastodon's `master` branch
```
git reset --hard upstream/master
```
The output should be something similar to this:
```
HEAD is now at abcd123 Some commit message
```
### Branch Out Again
#### 1. Decide the branch name
It is recommended to use RFC5646 language tag as your translation
branch name. If not sure, use `locale` as the branch name.
#### 2. Remove existing branch, if any.
```
git branch -D BRANCHNAME
```
If you get a message similar to either of the below ones, you're fine:
```
error: branch 'BRANCHNAME' not found.
```
or
```
Deleted branch BRANCHNAME (was abcd123).
```
#### 3. Branch out from master
```
git checkout master
git checkout -b BRANCHNAME
```
### Work on your translation
Write your awesome translations following the [translating guide](./Translating.md#translating-1)
### Push to your repository
#### 1. Review the Changes to Push
Open Terminal and navigate to where you stored mastodon (ex. `cd ~/Documents/mastodon`)
Type `git status` to see files you have modified or added.
We need to add those to the commit we're about to make and we can add them all at once with
```bash
git add .
```
#### 2. Create a Commit of the Changes
We can commit everything to our local copy with
```
git commit -m "YOUR MESSAGE HERE"
```
You'll want to make your commit message something short, but meaningful as it's visible to everyone. A good example would be, "Added French localization".
#### 3. Upload the Changes in the Commit
Now you can push your changes to your remote copy of mastodon using
```
git push
```
### Pull Request
1. [Click this](https://github.com/tootsuite/mastodon/compare) to start a new pull request, or navigate to [Mastodon's GitHub Page](https://github.com/tootsuite/mastodon), click `Pull requests`, and `New pull request`
2. On the Compare Changes page you will want to click `compare across forks`
3. The base fork should be `tootsuite/mastodon:master` and the head fork should be `YOURUSERNAME/mastodon:YOURBRANCH`. This will show you a summary of changed files.
4. Click `Create pull request` and explain your changes.