Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

untrack local changes

If you want remove all local changes - including files that are untracked by git - from your working copy, simply stash them:

git stash push --include-untracked
If you don't need them anymore, you now can drop that stash:

git stash drop
If you don't want to stash changes that you already staged - e.g. with git add - then add the option --keep-index. Note however, that this will still prevent merging if those staged changes collide with the ones from upstream.

If you want to overwrite only specific parts of your local changes, there are two possibilities:

Commit everything you don't want to overwrite and use the method above for the rest.

Use git checkout path/to/file/to/revert for the changes you wish to overwrite. Make sure that file is not staged via git reset HEAD path/to/file/to/revert.
Comment

PREVIOUS NEXT
Code Example
Python :: pandas drop unnamed columns grebber 
Python :: how to get the remainder of a number when dividing in python 
Python :: numpy substract subsequent elements 
Python :: generate-thumbnails-in-django-with-pil 
Python :: django app directory 
Python :: struct is not defined python 
Python :: convert pb to tb with python 
Python :: Tuples as return values 
Python :: 400/15 
Python :: Print in python capital p 
Python :: File "<ipython-input-12-48c6c043344b", line 29 coin = random.randint(0,1) ^ IndentationError: expected an indented block 
Python :: ipython list command history 
Python :: how to search on wikipedia with python and speak the result 
Python :: Python turtle (built in shape) image size 
Python :: bad resolution with df plot 
Python :: how to get max id in mongodb python 
Python :: stop animation matplotlib 
Python :: Define a python function day_of_week, which displays the day name for a given date supplied in the form (day,month,year). 
Python :: pyyhon SHA512 hash with key 
Python :: python as-lookup 
Python :: customise django admin edit model button in field 
Python :: n largest python 
Python :: create a dictionary from dataframe 
Python :: empty python file 
Python :: how to get user input in python 
Python :: *args in python 
Python :: python parse xml string 
Python :: remove a columns in pandas 
Python :: rotate 2 dimensional list python 
Python :: get tuple value python 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =