Difference between revisions of "Git"
Jump to navigation
Jump to search
(→How To) |
|||
Line 36: | Line 36: | ||
* '''[[/remote|git remote]]''' manage aliases for remote repositories | * '''[[/remote|git remote]]''' manage aliases for remote repositories | ||
* '''[[/reset|git reset]]''' resets current HEAD to the specified state | * '''[[/reset|git reset]]''' resets current HEAD to the specified state | ||
− | * '''[[/rm|git rm]]''' removes files from staging '''and also from the | + | * '''[[/rm|git rm]]''' removes files from staging '''and by default also from the filesystem''' |
* '''[[/show|git show]]''' | * '''[[/show|git show]]''' | ||
* '''[[/stash|git stash]]''' saves local modifications, reverts the working directory to match HEAD commit | * '''[[/stash|git stash]]''' saves local modifications, reverts the working directory to match HEAD commit | ||
Line 49: | Line 49: | ||
* '''[[/init|git init]]''' initializes a new repository; does not add anything | * '''[[/init|git init]]''' initializes a new repository; does not add anything | ||
* '''[[/add|git add]]''' updates the index using content found in the working tree (can be specified), to prepare the content staged for the next commit | * '''[[/add|git add]]''' updates the index using content found in the working tree (can be specified), to prepare the content staged for the next commit | ||
− | * '''[[/rm|git rm]]''' removes files from staging '''and also from the | + | * '''[[/rm|git rm]]''' removes files from staging '''and by default also from the filesystem''' |
* '''[[/status|git status]]''' shows status of current repository | * '''[[/status|git status]]''' shows status of current repository | ||
* '''[[/diff|git diff]]''' shows difference between current directory contents and what you have staged | * '''[[/diff|git diff]]''' shows difference between current directory contents and what you have staged |
Revision as of 16:01, 13 September 2021
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!
|
Concepts
Commands
alphabetical | by function |
---|---|
|
initialization
creating from scratch
copying to elsewhere
copying from elsewhere
|
Files
Software
- GUI clients:
- 10.6 Git Internals - Transfer Protocols: technical details
- could be used to implement a Git server
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
How To
- Oh Shit, Git!?!: solutions to frequently encountered situations in Git
- How to Rename the
master
branch tomain
in Git: the GitHub portion of this is also doable in GitLab, though the process is slightly different. - Change the default branch-name:
- How can I create a Git repository with the default branch name other than "master"?: This lets you change the default name of the branch that is created for new repositories.
Online Books
- Pro Git
- 1.3 Getting Started - Git Basics
- 1.6 Getting Started - Getting Help
- 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."
- 4.4 Git on the Server - Setting Up the Server
Online Courses
- Learn to use Git @ Code School (free registration required)
Articles
- 2019-03-05 Building software together with Git: a non-technical introduction