2.9 KiB
2.9 KiB
Translating GitHub Cheat Sheet
Install Git
- Install Git based on what operating system you have
- Add your identity 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).
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
NOTE: Use quotations around your name because of the space.
Fork The Repository
- Navigate to Mastodon's GitHub Page
- Click
Fork
in the top right. - There will now be a copy of the repository on your account.
Clone The Repository
- Open Terminal on your computer and navigate to a place where you want to store the project using
cd
(ex.cd ~/Documents
) - Download a copy of the project using
git clone https://github.com/YOURUSERNAME/mastodon`
- Write your awesome translations following the translating guide
Push To Your Repository
- 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
git add .
- 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
git push
Pull Request
- Click this to start a new pull request, or navigate to Mastodon's GitHub Page, click
Pull requests
, andNew pull request
- On the Compare Changes page you will want to click
compare across forks
- The base fork should be
tootsuite/mastodon:master
and the head fork should beYOURUSERNAME/mastodon:YOURBRANCH
. This will show you a summary of changed files. - Click
Create pull request
and explain your changes.
Finished
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 or pull request 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 available for git.