Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

stash untracked files

git stash push -m "custom messsage" --include-untracked
Comment

stash with untracked git

git stash -u
Comment

git stash untracked files

$ git statusOn branch mainChanges to be committed:    new file:   style.cssChanges not staged for commit:    modified:   index.htmlUntracked files:    script.js$ git stash -uSaved working directory and index state WIP on main: 5002d47 our new homepageHEAD is now at 5002d47 our new homepage$ git statusOn branch mainnothing to commit, working tree clean
Comment

git stash only untracked files

You can do it with alias in ~/.gitconfig:

stash-untracked = "!f() {    
    git stash;               
    git stash -u;            
    git stash pop stash@{1}; 
}; f"
And then just do

git stash-untracked
Comment

PREVIOUS NEXT
Code Example
Shell :: docker postgresql restore database 
Shell :: git discard all changes 
Shell :: git commits by author 
Shell :: check if variable contains string bash 
Shell :: git push to all remotes 
Shell :: installing pytesseract in python linux 
Shell :: How to create a new repository on the command line. 
Shell :: how to push git 
Shell :: linux install fzf 
Shell :: store git credentials ubuntu 
Shell :: "enter passphrase for key" 
Shell :: screen recorder ubuntu 
Shell :: moodle purge cache from command line 
Shell :: ubuntu install without suggested packages 
Shell :: psycopg2 error pip install error 
Shell :: how to set core.autocrlf in git 
Shell :: apache config file 
Shell :: linux get url after redirections 
Shell :: installing git on ec2 
Shell :: ubuntu notes install 
Shell :: brew stop redis 
Shell :: waybar emoji not wrok 
Shell :: uninstall vmware in ubuntu 
Shell :: check os command 
Shell :: openbullet2 installation on kali linux 
Shell :: xcode path mac 
Shell :: ffmpeg convert mp4 to gif 
Shell :: uninstall google drive ubuntu 20.04 
Shell :: git revert file to master 
Shell :: conda install pyvista 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =