GitHub TakeOuts

Naveen MeelNaveen Meel
2 min read

To make it Simpler below are Some of My TakeOuts for the GitHub

ls

This command will list down all the files and folders present in the current working directory


mkdir folder_name

This command will make a new folder in the current directory


cd folder_name

This command will change the present work directory to the given folder name


git init

This command will initialize the folder to work with git inside it


ls -a

This command will show all the hidden files in the current work directory


touch file.txt

This command will create a text file named "file" inside the current work directory


git status

This command will give the status of all the tracked and untracked file


git add <file_name>

This will add a specific file of the given name in the folder to the git


git add .

This will add all the files of the current working directory to git


git commit -m "<message>"

This will commit the file to git with the message


vi file.txt

To edit inside the file(use :wq to get out of the text file)


cat file.txt

To see what is written inside the txt file


git log

This will provide the log of all the changes done by you in git


git reset <log id>

This will reset the log/changes done after the given id


git stash

This will keep the untracked files backstage to use them after some time when needed


git stash pop

This will pop out the untracked files to add or put inside/commit the git


git stash clear

It will clear all the stash


git remote add origin <link>

This will add/link the repo with the current working directory


git remote -v

it will show links of all the linked repositories to the git folder


git push origin master

It will push the files inside the git repo in the master


git branch <name_of_branch>

This will add the new branch to the repo


git checkout <name_of_branch>

This will switch the current branch to the specified one


git merge <name_of_branch>

This will merge the specified branch with the current working branch


0
Subscribe to my newsletter

Read articles from Naveen Meel directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Naveen Meel
Naveen Meel