Ravi Kumar Profile picture
Web Developer | Technical Writer @lambdatesting | Sharing β€’ Web Dev Tips β€’ resources β€’ AI β€’ No-code tools β€’ | DM for Collaboration

Jul 14, 2021, 9 tweets

Github command that you should definitely know

πŸ§΅πŸ§΅πŸ‘‡πŸ‘‡

01. Git config

this command is used to set up a name or email that is associated with your GitHub account and link-local machine to Github.

syntax :
git config –-global user.name β€œ[name]”
git config -–global user.email β€œ[email address]”

πŸ‘‡πŸ‘‡

02. Git Init & GIt add

cd // used to change directory

git init [repository name] // used to initalisize your repository

git add [file] // used to add your repo into a staging area

git add . // used to add all files

03. Git commit

git commit -m β€œ[ Type in the commit message]”

// used to add commit your changes into a staging area like file addition, deletion, etc.

04. Git log & Git status

git log //used to check the history of the current branch

git status // used to see the list of files that have to be committed

05. Git branch

git branch // used to list all branches

git branch [branch name] // used to create branch

git branch -d [branch name] // used to delete branch

git checkout [branch name] // used to switch from one branch to other

git merge [branch ] // merge branches

06. Git remote

git remote add [variable name ] [Remote Server Link]

// used to connect local repository to a remote server

07. Git push & Git pull

git push [variable name] master

// used to send the local commit to the remote repository

git pull [Repository Link]

// used to fetch servers commit to local commit.

if you found this thread useful like and retweet the full thread so it helps others also.

πŸ‘‡πŸ‘‡

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling