How to stash untracked files of the current working directory in Git

0 votes

Hi Team,

I have some untracked files in the working directory. I want to stash untracked files of the current working directory. How can I do that?

Nov 20, 2020 in Git & GitHub by akhtar
• 38,240 points
9,871 views

1 answer to this question.

0 votes

Hi@akhtar,

In order to stash untracked files, add the “–include-untracked” option to your “git stash” initial command. Alternatively, you can simply use the “-u” which is equivalent to the untracked longer version.

$ git stash --include-untracked
Saved working directory and index state WIP on branch1: 808b598 Initial commit
$ git stash -u
answered Nov 20, 2020 by MD
• 95,420 points

Related Questions In Git & GitHub

0 votes
1 answer

How to save files in Git Stash?

Hi@akhtar, Git Stash temporarily save changes you've made to ...READ MORE

answered Nov 20, 2020 in Git & GitHub by MD
• 95,420 points
419 views
0 votes
1 answer

How to list all the files in a commit in Git?

Hi@akhtar, Using git diff-tree is considered as a preferred way ...READ MORE

answered Dec 22, 2020 in Git & GitHub by MD
• 95,420 points
349 views
0 votes
1 answer

How to get the current branch name in Git?

Hi@akhtar, You can run the git branch command ...READ MORE

answered Dec 22, 2020 in Git & GitHub by MD
• 95,420 points
8,449 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
2,334 views
+2 votes
1 answer
+1 vote
1 answer

How to remove untracked files from the current Git working tree?

Hi@akhtar, If you have thousands of file then ...READ MORE

answered Sep 4, 2020 in Git & GitHub by MD
• 95,420 points
629 views
0 votes
1 answer

How to find the hidden files in the Git repository?

Hi@akhtar, To find the hidden files in the ...READ MORE

answered Nov 19, 2020 in Git & GitHub by MD
• 95,420 points
9,051 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP