Move the Edits
You edited app.py on main, but the edit belongs on the branch feature, where app.py is not the same. Git refuses to switch while the edit is in the way. Take the edit over to feature without committing it.
Example 1
starts as
* 5623676 (feature) use os * d5010ce (HEAD -> main) first commit changed, not staged: app.py
ends as
on branch: feature
staged: nothing
changed, not staged: app.py
untracked: nothing
app.py:
import os
def main():
pass
main() # run it
stashes left: 0Constraints
- The edit is in the last line of
app.py;featurechanged its first line - Nothing is staged
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Git problems
- Off the Wrong BranchMedium
- Only on the BranchMedium
- Pick the LatestMedium
- Publish the BranchMedium
- Settle the ConflictMedium
- Since the ReleaseMedium
- Take Back the CommitMedium
- Two Lines of WorkMedium