segunda-feira, 4 de dezembro de 2023

How to remove unpushed commit in Visual Studio

 git reset --soft HEAD~


https://stackoverflow.com/a/63343196/194717

I did this to solve a conflict when doing a pull request

I did this to solve a conflict when doing a pull request


git pull

git checkout <feature_branch>

git pull origin <destination_branch>


At this point, pulling the destination will try to merge it with the source and reveal all the conflicts.


computer:my-repository emmap$ git pull origin main

 * branch            main     -> FETCH_HEAD

Auto-merging team_contact_info.txt

CONFLICT (content): Merge conflict in team_contact_info.txt

Automatic merge failed; fix conflicts and then commit the result.


Open the file to resolve the conflict. You can do this using the command line or you can navigate to the file.


git add <filename>

git commit -m'commit message'

git push origin <feature_branch>


https://support.atlassian.com/bitbucket-cloud/docs/resolve-merge-conflicts/