-
Notifications
You must be signed in to change notification settings - Fork 6
Github Basic Commands (Terminal)
juanfrans edited this page Dec 28, 2014
·
7 revisions
- Once you've created the repository and done your first commit, or forked it onto your local drive this is the basic workflow:
-
git status
- displays what files have changed or been added or deleted. -
git add -A
- adds all changes ("stages" the files). TheA
flag adds all changes. -
git commit -m "your message"
- commits all changes and adds a message describing this change. -
git push
- pushes your changes to the remote repository. - Here's a very useful cheat sheet with multiple basic git commands.
- You may do this in a couple of ways. You can use
git fetch
in combination withgit merge
or justgit pull
. The recommended method is just to dogit pull
. Here's a description of what they do: -
git fetch
- gets all the changes from the repository but doesn't change your local files. -
git merge
- combines the changes that you just fetched to update your files. -
git pull
- downloads all the changes and updates your local files.
-
rm -rf .git/
- to remove that directory from “version control”.
More info here by Dennis Tenen.