Banner: ZumGuy Publications and Network

ZumGuy Publications and Network

Git cheat sheet

Posted by Sean on Friday, 22nd September 2017 16:09
Here are the git commands I most frequently use, along with a brief description of what they are used for:

  • git init: create a new repository of the current directory.

  • ls -a: list all the items in the current directory.-ashows hidden items as well (like the .git folder).

  • git status: show the current status of the git repository, along with staged and untracked files.

  • git add : add to the staging area (files to be committed).git add .will add all untracked files.

  • git commit: commit staged files to the repository.

  • git log: show a list of all the past commits.

  • git fetch: sync with the remote server, getting information about remote commits but not downloading any data.

  • git pull: update the repository by downloading updates from a remote source. --allow-unrelated-histories may be necessary.

  • git push: update the repository on the remote server by upoading commits made on this machine.

  • git clone : download a new repository from the remote server.
Posted by Andrew on Sunday, 24th September 2017 08:31

Good for the records. Thanks!

You must be logged in to post messages.

Quote of the day...

ZumGuy Internet Promotions