Skip to content

sxhkhsm/Git-Commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Git-Commands

Here are Some commonly used Git and GitHub commands with their syntax and brief descriptions:

git init:

This command is used to initialize a new Git repository.

Syntax:

git init

git clone

This command is used to clone an existing Git repository.

Syntax:

git clone [repository URL]

git status

This command is used to check the status of the files in the repository.

Syntax:

git status

git add

This command is used to stage files for commit.

Syntax:

git add [file]

git commit

This command is used to commit changes to the repository.

Syntax:

git commit -m "[commit message]"

git push

This command is used to push changes to a remote repository.

Syntax:

git push [remote name] [branch name]

git pull

This command is used to pull changes from a remote repository.

Syntax:

git pull [remote name] [branch name]

git branch

This command is used to list, create, or delete branches.

Syntax:

git branch [options] [branch name]

git checkout

This command is used to switch between branches.

Syntax:

git checkout [branch name]

git merge

This command is used to merge changes from one branch into another.

Syntax:

git merge [branch name]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published