general workflow of git
fork to my github
git clone git url (the place where project will put)
cd theNameOfFolder
git remote add --track master upstream git url
git fetch upstream
git merge upstream/master
git branch newBranch
git checkout newBranch(on the newBranch branch)
Now you're getting ready to start hacking, you'll want to switch off of the 'master' branch and onto a different branch for your new feature. It's important to do this because you can only have one Pull Request per branch, so if you want to submit more than one fix, you'll need to have multiple branches.
git status(check what has been edited or added)
git add . //add all modified files; git add fileName//add one file
git commit -m "commit itselfe
git push -u theBranchName(first time push) / git push theBrunchName(2 and after push)
Then go to that page on GitHub and change branches to the one for your new feature.
Then, click on the button 'Pull Request'. This will bring you to a page asking you to describe your change. Describe it thoroughly.
Then press 'Submit Pull Request'.
the reference:
https://www.gun.io/blog/how-to-github-fork-branch-and-pull-request
Keep the upstream the latest of the original master, diff from the fork clone master in the local.
Last updated