I am new to git and adjusting my workflow from SVN. The biggest problem I have is if I want to make a pull request into the master repo controlled by the project maintainer I have all these commits that I don’t want.
here is the steps I’ve been taking
git checkout develop
git fetch upstream
git merge upstream/develop
Modify file
git add /file
git commit file -m "some commit"
git push origin develop
Then on github make the pull request. Now when I make a pull request rather than it saying 1 commit 1 file its like 24 commits and has all these other people’s commits from upstream. What additional steps do I need to add or remove from my workflow that will allow me to just submit a pull request for the one file I need.
Try this workflow instead:
git fetch upstreamgit checkout -b new_branch upstream/develop(creates a new branch and puts you on it)git add <files>git commit -m "some message"git push origin new_branchAlso, is the upstream’s main branch the
developbranch? Usually the main branch is namedmaster. If you’re basing your changes off a branch other than the main branch, pull requests might show any commits that are in the other branch but not the main one.