From the course: Learning Git and GitHub
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Git stash and clean
From the course: Learning Git and GitHub
Git stash and clean
- [Instructor] Some commands aren't really part of the core of what GitHub can do, but they're so useful that I'd like to leave them here as a bonus before we get into GitHub. So the first command that I want to show you is called the git stash. Stashing is a way of putting away code temporarily so that you can work on something else. This is the perfect thing to use when maybe your boss comes in and tells you that he needs a super important change. But you were already working on some new changes on the current branch that you were in. So you essentially want to restore everything, but you want to not lose any of the changes that you've made. And this is what it looks like. You do a git stash, and it will take whatever the changes were and temporarily put them in a storage facility, say. And then you can take a look at what's been stored by using git stash list. And there's a couple of ways of retrieving the stash.…
Contents
-
-
-
Understanding version control1m 53s
-
(Locked)
What is Git?2m 16s
-
(Locked)
Setting up Git4m 35s
-
(Locked)
Understanding Git environments5m 51s
-
(Locked)
Ignoring files4m 5s
-
(Locked)
Deleting and renaming files6m 8s
-
(Locked)
Differences4m 9s
-
(Locked)
Changing history12m 7s
-
(Locked)
Branches6m 13s
-
(Locked)
Merge conflicts10m 7s
-
(Locked)
Git stash and clean9m 27s
-
-
-
-
-