Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mementomori11723/learn-git

Here are a few Git (A version control software) commands
https://github.com/mementomori11723/learn-git

Last synced: 25 days ago
JSON representation

Here are a few Git (A version control software) commands

Awesome Lists containing this project

README

        

# Git (version control software)

## Commands -

### 1. git init

Initialzes inside a repository with a folder name ".git" where it stories all the Snapshots of the project.

### 2. git add (names of one or more files)

This commind adds all the changes made to the repository in "Staging area" section from which a snapshot is taken and added to "commits" section.

### 3. git status (-s)

Shows us the status of git repository (like are there any files that need to be added or not).

-s is used to show short version of what happened to repo.

### 4. git commit (--flages) ("message")

Here we create a perminant snapshot of our project to git.

### 5. git ls-files

Shows the files in "Staging area".

### 6. git rm [file('s) name('s)]

Removes the files from repository and from "staging area".

### 7. git diff

Shows the difference between different commits and staging areas

### 8. git log (--oneline)

Shows us the log details of the repo.

--oneline shows single line of each commit.

### 9. git show (commit id or referance)

Describes the changes made in that commit.

### 10. '.gitignore' file

It is a type of file used for ignoring files that aren't nessary or too large to commit.

### 11. git branch (-c "name of the branch")

This will create a new branch that can be used for testing purpouses!