You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the situation that you have branched main to your new branch, lets say dev and while you were woking on dev, main moved ahead. You might not be able to merge your pull request automatically. In that case, you have 2 options.
Use the github editor to resolve conflicts
Git rebase on your branch and commit [RECOMMENDED]
git rebase on your local machine allows you to test the code again as well
Also @rishi4rks, regarding the files not being changed when we switch branches locally, the command is git stash
it always to keep your changes in a branch without commiting it and lets you switch easily as well
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the situation that you have branched
main
to your new branch, lets saydev
and while you were woking ondev
,main
moved ahead. You might not be able to merge your pull request automatically. In that case, you have 2 options.A deep explanation about rebase : https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase
Also for github desktop users, here
https://github.blog/2019-06-05-github-desktop-expands-to-support-stashing-and-rebasing/
Also @rishi4rks, regarding the files not being changed when we switch branches locally, the command is
git stash
it always to keep your changes in a branch without commiting it and lets you switch easily as well
Beta Was this translation helpful? Give feedback.
All reactions