User Tools

Site Tools


guides:software:git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
guides:software:git [2021/09/16 18:28] – [Server: GitLab, GitHub, etc] jhoggardguides:software:git [2022/08/02 11:59] (current) – external edit 127.0.0.1
Line 160: Line 160:
 The following are common tasks to complete using git. Where we refer to GitLab, the same task can be completed with other git servers, such as GitHub, usually with very little or no change. The following are common tasks to complete using git. Where we refer to GitLab, the same task can be completed with other git servers, such as GitHub, usually with very little or no change.
  
-  * ''fork'': Make your own copy of someone else's repository on GitLab. +  * ''fork'': Make your own copy of someone else's repository on GitLab.\\ This is done on a GitLab web page by clicking the "fork" button
-  * ''clone'': Copy a GitLab archive to your personal computer. +  * ''clone'': Copy a GitLab archive to your personal computer. \\ Usage: ''git clone <address>'' 
-  * ''init'': Initialize a new git repository on your own computer. (Will not be connected to a server.) +  * ''init'': Initialize a new git repository on your own computer. (Will not be connected to a server, but it is possible to add one later.) \\ Usage: ''git init''. 
-  * ''status'': Show what files are untracked, changed, staged, etc., in the current local repository. +  * ''status'': Show what files are untracked, changed, staged, etc., in the current local repository.  \\ Usage: ''git status'' 
-  * ''add'': Add files to your local staging area. +  * ''add'': Add files to your local staging area. \\ Usage: ''git add <filename>'' 
-  * ''commit'': Move files from the staging area to your local repository. +  * ''commit'': Move files from the staging area to your local repository. \\ Usage: ''git commit -m "Commit message"'' \\ If the ''-m "Commit message"'' is left out, an editor will open for you write your commit message
-  * ''pull'': Update your local archive with changes/additions made to the server. (Assumes that you have an "upstream" repository on a server to pull from.) +  * ''pull'': Update your local archive with changes/additions made to the server. (Assumes that you have an "upstream" repository on a server to pull from.) \\ Usage: ''git pull'' 
-  * ''push'': Push changes in your local repository upstream to the server repository.  (Assumes that you have an "upstream" repository on a server to pull from.) +  * ''push'': Push changes in your local repository upstream to the server repository.  (Assumes that you have an "upstream" repository on a server to pull from.  \\ Usage: ''git push'' For more control, use ''git push origin <branchname>'' 
-  * ''log'': See a list of commits made to your repository. +  * ''log'': See a list of commits made to your repository.  \\ Usage: ''git log'' 
-  * ''checkout'': Switch to a new branch. +  * ''checkout'': Switch to a new branch.  \\ Usage: ''git checkout <branchname>'' 
-  * ''diff'': See differences between various branches.+  * ''diff'': See differences between various branches.  \\ Usage: ''git diff'' for the difference between current files and last commit.  \\ ''git diff <branchname>'' compares to another branch.
  
  
guides/software/git.txt · Last modified: 2022/08/02 11:59 by 127.0.0.1