Basics of Using Git from the Command Line
I was looking for the shortest tutorial on the basics of using Git from the command line. This one, Git Tutorial 4: Basic Commands: add, commit, push from YouTube was pretty good.
Here are some notes I made from watching that video:
git statuscommand will show you files and folders that have changes. It also shows you files that you've already committed into your local repository, but haven't pushed yet into a remote server.
git addcommand adds files that have changes into a staging area on your local computer.
git commitcommand will commit those changes into your local repository. Emphasis on local. At this point your changes are not saved to a remote server like Github just yet. The committed changes are still on your local Git repository.
git pushcommand is the one that will send your changes up to your remote Github repository.
This next tip is not something I learned from the video, but from someplace else that I don't remember.
- To get out of a long results screen from using the
git logcommand, you can type
Links to this page: Weeknotes – 011