Closed JordanGibson-Price closed 8 years ago
Hi @JordanGibson-Price , PRs need to cleanly commit only the code intended to fix the issue at hand, and not include any regressions. This PR can't be accepted in its current state. It's also obsolete due to a another fix, so I am closing this PR.
However, for the future, please note you may have an issue where your editor is not getting updated with current code, and then it is writing an older version over the newer version. Before you make any commit, after running git add
on all the files with changes you want, you should view a git diff --staged
, to be sure nothing unintended is in there. If there is any stray code, a git reset HEAD
will undo your add
s and let you start over. If you find that errors have previously been committed, please start over with a new branch.
@arowla understood. I learned this the hard hard way last week while I was trying to upload these changes.
To be sure, before I make any commits, should I do a git stash
to save the changes on my branch and then also do a git pull
, not a git clone
, to get the latest changes from the repo? Or should I git stash
, and then do a git cherry-pick
instead of a git pull
? Or should I do something different all together/ stick to what you are suggesting? Is there a specific time I should use git cherry-pick
?
Please stick to what I am suggesting.
git stash
is useful, but only necessary if you do git pull
prior to committing to bring your branch up to date, and you get a message indicating that an automatic merge couldn't be performed due to a conflict. In that case, git stash
, redo git pull
, then immediately git stash pop
to reapply your changes to your working copy.
git clone
is the very first command you use to pull down a repo, but should basically be forgotten after that. It is not part of the project workflow.
git cherry-pick
is a useful command to get out of scrapes but should not be considered part of the normal workflow, either.
Current coverage is 61.75%