Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git issues

1.//git push to wrong branch
git checkout bug-fix   //goto correct branch
git cherry-pick main   //last commit of main branch to bug_fix

2.//revert main branch
git checkout main
git reset --hard HEAD~1  //change to prev state.


//git reverse last push
git reset --hard <revision_id_of_last_known_good_commit>
git push --force    //prev state will push


//merge conflict
1.git merge --abort

2.Resolve the conflict.

3.Don't forget to add and commit the merge.

4.git pull ,now should work fine
Comment

PREVIOUS NEXT
Code Example
Shell :: mount is fstab 
Shell :: pip install datetime 
Shell :: install magento 2 docker 
Shell :: git go to commit id 
Shell :: bash script get last position of character in string 
Shell :: selinux 
Shell :: install bottom navigation in native 
Shell :: docker desktop for fedora 
Shell :: generate token symfony authentication api platform 
Shell :: git diff ignore file 
Shell :: remove .idea from git 
Shell :: powershell command line variables 
Shell :: chmod command 
Shell :: dir command 
Shell :: yum install redis cli 
Shell :: git the history 
Shell :: make atom default editor in git 
Shell :: print file size in mb linux 
Shell :: grep substring 
Shell :: vim set paste 
Shell :: diff between two files 
Shell :: how to start kurento medial server in linux 
Shell :: std error bash 
Shell :: repo tool depth 
Shell :: Install Deno - Scoop (Windows) 
Shell :: docker-compose-to-always-re-create-containers-from-fresh-images 
Shell :: linux kill other user xorg 
Shell :: Error: No Homebrew ruby 2.6.8 available for arm64 processors! 
Shell :: Linux waitptid function 
Shell :: compressing files on cmd line using winrar 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =