Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xavierchanth/git-command-cheatsheet
https://github.com/xavierchanth/git-command-cheatsheet
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/xavierchanth/git-command-cheatsheet
- Owner: XavierChanth
- Created: 2020-02-26T22:57:23.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-26T23:34:15.000Z (almost 5 years ago)
- Last Synced: 2024-12-25T05:18:41.255Z (24 days ago)
- Size: 1.95 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git & Github Workshop
## Install Git
Windows:
> https://git-scm.com/Linux:
> $ sudo apt install gitMac:
> $ git## Create a Github Account
> https://github.com
## Student Upgrade
> https://education.github.com/pack/offers
## Basic Unix Commands
### These work in the following command lines
- Linux
- Windows subsystem for linux (wsl)
- Git Bash (From installing on windows)
- MacMake a new directory:
> $ mkdir {directory name}List the files in the present working directory:
> $ lsChange the directory:
> $ cd {directory name}List the present working directory:
> $ pwdCreate a file:
> $ touch {file name}## Git Commands
Initialize the git repository:
> $ git initAdd a file to the staging area:
> $ git add {file names}( . will add all files with a change)
(seperate multiple files with spaces)Commit these files:
> $ git commit -m "{your commit message}":Clone a repository to the present working directory:
> $ git clone {repository link}Show the current status of the repository:
> $ git status## Git Config
git config --global user.name "YOUR GITHUB USERNAME"
git config --global user.email "GITHUB EMAIL"
git config --global credential.helper {$}
> The "$" above can be one of store or cache.
> By default it will not cache or store the password.## Extras
For working in teams learn:
- git checkout command
- github branches