Difference between revisions of "Git"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(→‎Commands: slight correction)
Line 69: Line 69:
 
** [http://git-scm.com/book/en/Getting-Started-Getting-Help 1.6 Getting Started - Getting Help]
 
** [http://git-scm.com/book/en/Getting-Started-Getting-Help 1.6 Getting Started - Getting Help]
 
** [http://git-scm.com/book/en/Git-Basics 2. Git Basics] - "If you can read only one chapter to get going with Git, this is it. This chapter covers every basic command you need to do the vast majority of the things you’ll eventually spend your time doing with Git."
 
** [http://git-scm.com/book/en/Git-Basics 2. Git Basics] - "If you can read only one chapter to get going with Git, this is it. This chapter covers every basic command you need to do the vast majority of the things you’ll eventually spend your time doing with Git."
 +
** [https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server 4.4 Git on the Server - Setting Up the Server]
  
 
===Online Courses===
 
===Online Courses===

Revision as of 20:13, 4 June 2018

About

Git is a version control system based on a powerful distributed model.

This page is a seed article. You can help HTYP water it: make a request to expand a given page and/or donate to help give us more writing-hours!

Commands

alphabetical by function
  • git add updates the "staged" area using content found in the working tree (can be specified)
  • git branch manages branches
  • git checkout
  • git clone copies a repository from somewhere else
  • git commit commits changes currently staged
  • git config
  • git diff shows difference between current directory contents and what you have staged
  • git fetch fetches named heads or tags from one or more other repositories, along with the objects necessary to complete them.
  • git init initializes a new repository; does not add anything
  • git merge
  • git pull incorporates changes from a remote repository into the current branch. In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD.
  • git push updates remote refs using local refs, while sending objects necessary to complete the given refs
  • git remote manage aliases for remote repositories
  • git reset resets current HEAD to the specified state
  • git rm removes files from staging and also from the directory
  • git show
  • git stash saves local modifications, reverts the working directory to match HEAD commit
  • git status shows status of current repository
  • git tag creates an alias for a particular revision

initialization

creating from scratch

  • git init initializes a new repository; does not add anything
  • git add updates the index using content found in the working tree (can be specified), to prepare the content staged for the next commit
  • git rm removes files from staging and also from the directory
  • git status shows status of current repository
  • git diff shows difference between current directory contents and what you have staged
  • git commit commits changes currently staged

copying to elsewhere

copying from elsewhere

  • git clone copies a repository from somewhere else

Files

Software

Services

  • GitHub: free web-based git repository for open-source projects

Error Messages

  • Error Code 403 fatal: HTTP request failed may indicate a bad password. I've found that sometimes the password either doesn't paste properly or else isn't being accepted the first time; trying again with the same password may work. (The password is not displayed, so I'm not sure which it is.)

Links

Reference

Online Books

Online Courses

Discussion