Skip to content

mumin91/some-useful-git-command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Untrack a single file that has already been added/initialized to repository, i.e., stop tracking the file but not delete it from system use

Syntax: git rm --cached <filename> Example: git rm --cached Pipfile.lock

Force “git pull” to overwrite local files

  1. Download the latest code from remote without trying to merge or rebase anything: git fetch --all
  2. Reset the master branch to what is fetched. Add --hard option to change all the files in working tree to match the files: Syntax: git reset --hard origin/<branch_name> Example: git reset --hard origin/master

About

Here is some useful git commands that I need to use often but forget after few days then learn again.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published