Git Commands: The 13 You Must Know, In Order

to discard changes in working directory) modified: file no changes added to commit (use”git add” and/or”git commit -a”) Now, just do as Git says and add the change: git add file You can now commit normally: git commit -m “Add new line to file” What if you had several changes to commit? LEARN MORE ABOUT […]

to discard changes in working directory) modified: file no changes added to commit (use”git add” and/or”git commit -a”) Now, just do as Git says and add the change: git add file You can now commit normally: git commit -m “Add new line to file” What if you had several changes to commit? LEARN MORE ABOUT UNDOING THINGS If you want to learn more about how to go back in Git, check out the following article: GIT: GET GOOD QUICKLY BY MASTERING THE KEY COMMANDS The “surface area” of Git commands can feel daunting. Even though that’s not exactly how things work under the hood, you can think of branches as independent copies of your project where you’re free to experiment without messing with the main line of work.
Source: CloudBees