how to use git stash




Git stash Dùng để lưu một bản sao trạng thái thay đổi hiện tại

Git stash list 
dùng để view danh sách các stash

git stash apply 
nó sẽ apply stash{0} nhưng k xóa stash đó đi

git stash pop 
nó sẽ apply stash{0} và xóa stash đi

git stash drop 
sẽ k apply nhưng sẽ xóa stash{0}

git stash apply stash@{1}
sẽ k xóa stash, và apply stash{1}



Nhưng tất cả apply trên sẽ chỉ áp dụng cho tại vùng Working, không áp vào vùng Staging



Để stassh vào cả vùng staging thì thêm option --index

git stash apply --index

Comments

Popular posts from this blog

Fixing the DeepSpeed Import Error While Fine-Tuning the Qwen Model

Amazon Linux 2023 - User data configuration for launch templates to connect to the EKS cluster

How to create ISM policy and rotate logs in opensearch