Skip to content

amalageorge/Commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

Git commands

How to initialize a repository

How to clone a repo

  1. Goto the corresponding repo page on github
  2. Get the url

git init

initializes git

git status

Shows all the staged and unstaged files (Does not show already committed files)

git add <file_name>

Adds a file to the staging area

git commit

commits file or files

git log

shows the commit history

git push

pushes the committed files

git add -A

adds all the changes to the staging area

git reset <file_name>

to unsatge a file

git diff

to know the changes made in the file

git branch <name>

to create a new branch

git pull

pulls files from remote repository to local

git checkout -b <branch_name>

creates new branch

Linux

ls

Lists files and directories

ls -la

Lists all files and directories

la -a

list all files including the hidden files

cd ~

home directory

cd ..

parent directory

.

current directory

subl .

opens the current directory

subl file_name.py or subl <file_name>.txt

opens the file in sublime

cd ../<from_file>/<to_file>

travels from one file to other file within the same directory

rm

remove

open .

opens currrent directory

Mac related

cmd + Q

quit

cmd + W

quit tab

cmd + click

open link in new tab

cmd + T

new tab

About

Commands that I learn

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors