git remove file from history
Shell
$ git rm --cached giant_file
# Stage our giant file for removal, but leave it on disk## 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...
Also in Shell:
- Title
- how to start a web server linux
- Category
- Shell
- Title
- xcuserstate file git
- Category
- Shell
- Title
- mongodb installation on mac
- Category
- Shell
- Title
- install nuxt
- Category
- Shell
- Title
- get serial number for server using powreshell
- Category
- Shell
- Title
- ubuntu dns server
- Category
- Shell
- Title
- linux edit file
- Category
- Shell
- Title
- shell count number of lines
- Category
- Shell
- Title
- bash remove directory
- Category
- Shell
- Title
- fatal: could not read Username for 'https://github.com': Device not configured push crontab
- Category
- Shell
- Title
- check changes after git pull
- Category
- Shell
- Title
- git command to create a branch
- Category
- Shell
- Title
- how to install docker ubuntu
- Category
- Shell
- Title
- golang compile with injected variable
- Category
- Shell
- Title
- bash generate random number between 1 10
- Category
- Shell
- Title
- laravel create controller
- Category
- Shell
- Title
- set username git
- Category
- Shell
- Title
- matplotlib change he yticks to two number after digit
- Category
- Shell
- Title
- git list remote branches
- Category
- Shell
- Title
- java to jar
- Category
- Shell
- Title
- git set upstream
- Category
- Shell
- Title
- git add commit in one command
- Category
- Shell
- Title
- set git pull rebase default
- Category
- Shell
- Title
- powershell command line variables
- Category
- Shell
- Title
- bash write
- Category
- Shell
- Title
- git worktree
- Category
- Shell
- Title
- linux datei erstellen
- Category
- Shell
- Title
- how to kill tasks using grep
- Category
- Shell
- Title
- install concrete 5 on ec2 instance
- Category
- Shell
- Title
- ubuntu unzip zip
- Category
- Shell
- Title
- powershell new item
- Category
- Shell
- Title
- linux select pages from pdf
- Category
- Shell
- Title
- command line ip
- Category
- Shell
- Title
- grep command
- Category
- Shell
- Title
- linux permanent mount
- Category
- Shell
- Title
- desktop trigger click bash shell ubuntu
- Category
- Shell
- Title
- how to install yum uitls
- Category
- Shell
- Title
- github undo last pushed commit
- Category
- Shell
- Title
- mvn clean install skip test
- Category
- Shell
- Title
- how to install emotion in gatsby
- Category
- Shell
- Title
- fleet management software github
- Category
- Shell
- Title
- set up git with github
- Category
- Shell
- Title
- installing caddy server in ubuntu 18
- Category
- Shell
- Title
- wmv to mp4 ffmpeg
- Category
- Shell
- Title
- npm list global packages
- Category
- Shell
- Title
- ping a port linux
- Category
- Shell
- Title
- scp send file
- Category
- Shell
- Title
- remove .svn recursively linux
- Category
- Shell
- Title
- how to upload files to s3 bucket from mac shell
- Category
- Shell
- Title
- stop docker container
- Category
- Shell
- Title
- bash get field from line
- Category
- Shell
- Title
- utorrent on ubuntu
- Category
- Shell
- Title
- install flathub in linux elementary
- Category
- Shell
- Title
- how to revert to log in git
- Category
- Shell
- Title
- npm install express-handlebars
- Category
- Shell
- Title
- update pip
- Category
- Shell
- Title
- Realtek RTL8812BU Network WiFi Adapter kali linux driver
- Category
- Shell
- Title
- kubernetes service external ip pending
- Category
- Shell
- Title
- install phpmyadmin ubuntu 18.04
- Category
- Shell
- Title
- how to remove untracked files in git
- Category
- Shell
- Title
- install bootstrap angular
- Category
- Shell
- Title
- store result of command in variable bash
- Category
- Shell
- Title
- list config git
- Category
- Shell
- Title
- long term projects for java learners
- Category
- Shell
- Title
- how to install node modules python
- Category
- Shell
- Title
- install pandas conda
- Category
- Shell
- Title
- how to pull the changes from git without staging local changes
- Category
- Shell
- Title
- install pygame
- Category
- Shell
- Title
- timedatectl
- Category
- Shell
- Title
- git SSL certificate problem: certificate has expired
- Category
- Shell
- Title
- git remove tag from remote
- Category
- Shell
- Title
- git rebase one commit
- Category
- Shell
- Title
- linux red hat version
- Category
- Shell
- Title
- mount: cdrom: failed to setup loop device for
- Category
- Shell
- Title
- foreach loop powershell
- Category
- Shell
- Title
- check ubuntu version
- Category
- Shell
- Title
- git load all submodules
- Category
- Shell
- Title
- java project ideas
- Category
- Shell
- Title
- How to delete docker images older than x days from docker hub using a shell script
- Category
- Shell
- Title
- install npm globally
- Category
- Shell
- Title
- linux install node
- Category
- Shell
- Title
- turn of raspberry
- Category
- Shell
- Title
- linux replace string in all files
- Category
- Shell
- Title
- how to create a branch in git
- Category
- Shell
- Title
- install lutris ubuntu 20.04
- Category
- Shell
- Title
- linux wget example
- Category
- Shell
- Title
- how to update local repo when i make changes to github remote repo
- Category
- Shell
- Title
- shell promt user input
- Category
- Shell
- Title
- rename local branch github
- Category
- Shell
- Title
- if else in mac terminal
- Category
- Shell
- Title
- change ratio vmware ubuntu
- Category
- Shell
- Title
- install windows service
- Category
- Shell
- Title
- install pybind ubuntu
- Category
- Shell
- Title
- install axios
- Category
- Shell
- Title
- powershell foreach
- Category
- Shell
- Title
- windows 10 direct inbound port to another device
- Category
- Shell
- Title
- how to check if django is installed in ubuntu
- Category
- Shell
- Title
- .gitignore not working
- Category
- Shell
- Title
- ubuntu list users
- Category
- Shell
- Title
- conda install mmcv
- Category
- Shell