- In terminal
cd ~/projects git clone [email protected]:opencollective/opencollective-frontend.git- NOTE: need SSH set up to use git@github style repo addresses
cd opencollective-frontend
git checkout masterChange to master branch- NOTE: if you have uncommitted changes it won't let you change branch. Run
git checkout .to wipe away all uncommited changes (or commit)
- NOTE: if you have uncommitted changes it won't let you change branch. Run
git pull origin master- pull latest changes from: the "origin" remote (github here) and the "master" branch.
- NOTE: this command pulls those changes into whatever branch you are currently standing in
- NOTE: conflicts are possible (ask me)
- Now master branch is up to date
git checkout -b fix_typofix_typo is new branch name- zsh will show branch as
fix_typo - to confirm what branch you're on:
git branch
- zsh will show branch as
git checkout fix_typosgit pull origin masterpulls in any changes made by others- Open text editor
- Make changes
- Save
- Go to terminal
- Press enter and see ✗
git statusshows files with changesgit diffshows actual changes
Do this in small chunks by logical category, or when done for the day
- we "stage" the files
- this means mark them as wanting to include in a commit
git add README.mdgit add translations/*.jsongets you all json files in the translations foldergit add --alladds ALL files with changes
- we "commit" the staged files
git commit -m "update to README with new contributor section"git statusto check files not stages anymore
Push every time you commit
git checkout fix_typo(move to the branch you want to push)git push origin fix_typo(pushing my branch's state to my branch on the origin repo)