- Requirements:
- git
- Fork target repo you want to make changes to
- use github web ui
NOTE
- If you have an existing fork, do not delete it.
- Instead, update your fork's master branch
export GITHUBUSERNAME="your github name"
export GITREPONAME="git repo name"
git remote add upstream https://github.com/$GITHUBUSERNAME/$GITREPONAME.git
git fetch upstream
git checkout master
git merge upstream/master
- Create Ticket/Card in Trello
- Format ISSUEID-00000X
- example: Securethebox Trello Board: https://trello.com/b/2Qxn34Ok/securethebox
- Make a new branch before git adding files
git checkout -b ISSUEID-00000X
- Get git status and remove any files you do not want
git status
git checkout /path/of/unwanted/file
- Add files
- All files
git add .
- Single File
git add /path/to/file
- Add any secret files to
.gitignore
file
- this will make git ignore files before publishing
- Make a commit
git commit -m "Updated some file"
- Push commit and branch to your fork's branch
export CURRENTGITBRANCH=$(git branch | grep \* | cut -d ' ' -f2)
git push --set-upstream origin $CURRENTGITBRANCH
- Open to your github page pull request
export GITHUBUSERNAME="your github name"
export GITREPONAME="git repo name"
open https://github.com/$GITHUBUSERNAME/$GITREPONAME/compare/master...$GITHUBUSERNAME:$CURRENTGITBRANCH?expand=\"
- Merge your branch
- Use ui
- Sync your clone fork master branch with origin master
git checkout master
git pull