git remove commit
# Removes latest commit from the stash, KEEPS changes git reset --soft HEAD~ # Removes latest commit from the stash, DELETES changes git reset --hard HEAD~
git remove commit
# Removes latest commit from the stash, KEEPS changes git reset --soft HEAD~ # Removes latest commit from the stash, DELETES changes git reset --hard HEAD~
undo local commit
$ git reset --soft HEAD~1
erase commit from git repo
git reset <reference_to_commit> #default flag --mixed #Commits are reference with the HEAD~ not SHA. #HEAD~1 is the 2nd commit, HEAD~2 is the 3rd commit, HEAD~3 is 4th commit.... #NB: Be aware of the active branch. git reset --mixed HEAD~<reference_no.> #Moves HEAD to the referenced commit, # and moves commits before it to the working directory. git reset --soft HEAD~<reference_no.> # Moves HEAD to the referenced commit, # and moves commit before it to the staging index. git reset --hard HEAD~<reference_no.> #Moves HEAD to the referenced commit, # and moves commits before it to the trash and erased from tree. #NB: All commits that are reset are kept in the trash for 30days.
github remove a file from a commit
## Remove Files From Git Commit ## In order to remove some files from a Git commit, use the “git reset” ## command with the “–soft” option and specify the commit before HEAD. git reset --soft HEAD~1 ## Now that your files are in the staging area, you can remove them (or ## unstage them) using the “git reset” command again. git reset HEAD <file> git rm --cached <file> ## When you are done with the modifications, you can simply commit your ## changes again with the “–amend” option. git commit --amend ## Check file is no longer in the list git ls-files ## Then if you're happy, you can do your push...
how to delete a commit from a branch
# How to stash and remove a commit from a branch that has already been pushed git stash save "<comment>" git stash pop # git stash list git reset --hard HEAD~1 # 1 stands for the amount of commits to go back from HEAD git push origin HEAD --force
add bootstrap to react
//1.run following commnad in cmd: npm install bootstrap --save //you can now use bootstrap component. example: import { Button } from 'react-bootstrap'; //2.or add this to index.js: <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous" />
how to use bootstrap cdn in react
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us