Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git can we reset a new branch to a specific commit

git reset --hard cedc856
git push --force origin master
Comment

how to revert to a specific commit

git revert <commit-hash>
Comment

git revert back to specific commit

# This will create three separate revert commits:
git revert a867b4af 25eee4ca 0766c053

# It also takes ranges. This will revert the last two commits:
git revert HEAD~2..HEAD

#Similarly, you can revert a range of commits using commit hashes (non inclusive of first hash):
git revert 0d1d7fc..a867b4a

# Reverting a merge commit
git revert -m 1 <merge_commit_sha>

# To get just one, you could use `rebase -i` to squash them afterwards
# Or, you could do it manually (be sure to do this at top level of the repo)
# get your index and work tree into the desired state, without changing HEAD:
git checkout 0d1d7fc32 .

# Then commit. Be sure and write a good message describing what you just did
git commit
Comment

git reset to a specific commit

git reset --hard 61234
git push -f
Comment

PREVIOUS NEXT
Code Example
Shell :: github readme images 
Shell :: what is kernel and shell 
Shell :: how to install swift on ubuntu 
Shell :: scrapy spider shell from spider 
Shell :: gitlab runner npm command not found 
Shell :: install bully kali 
Shell :: best source code editor 
Shell :: online shell script compiler 
Shell :: search for ADS 
Shell :: how to run a command async in ubuntu 
Shell :: speedtest cli 
Shell :: shell script to find sum of n numbers using for loop 
Shell :: ssh 
Shell :: remote: fatal: pack exceeds maximum allowed size 
Shell :: how to append string to file names in linux 
Shell :: copy code from one repo to another git 
Shell :: letencrpt 
Shell :: react navigation stack 
Shell :: how to setup .env file for docker 
Shell :: Malformed entry 2 in list file /etc/apt/sources.list.d/docker.list ([option] not assignment) 
Shell :: install watchman on linux 
Shell :: install pkgbuild arch 
Shell :: install biocmanager in rstudio 
Shell :: ipnyb to ppt 
Shell :: install tar.xz on linux 
Shell :: tmux status line with blank line on top 
Shell :: Anydesk remote server display not supported e.g Wayland 
Shell :: how to rename a file in linux 
Shell :: git remote push 
Shell :: rename a branch alredy pushed 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =