1. git init
The git init command is used to initialize a new Git repository.
This command can be used to set up a new repository or to convert an existing project to a Git repository.
The git init command is used to initialize a new Git repository.
This command can be used to set up a new repository or to convert an existing project to a Git repository.
The git init command creates a new directory that contains all of the necessary Git files, such as the .gitignore file and the .gitattributes file.
2. git status
The "git status" command is a powerful tool that allows you to see the current state of your git repository.
This command can be used to see which files have been modified, which files are new, and which files are not being tracked by git.
The "git status" command is a powerful tool that allows you to see the current state of your git repository.
This command can be used to see which files have been modified, which files are new, and which files are not being tracked by git.
This command is also helpful in seeing which branch you are currently on and which files would be included in a commit.
3. git add <file or directory>
The "git add" command is used to add files to the staging area.
The staging area is a temporary location where changes are stored before they are committed.
This command can be used to add one or more files or to add all changes in a directory
The "git add" command is used to add files to the staging area.
The staging area is a temporary location where changes are stored before they are committed.
This command can be used to add one or more files or to add all changes in a directory
4. git commit -m "Commit message in quotes"
The "git commit -m" command is used to commit changes to a Git repository.
This command takes a message as an argument, which is used to describe the changes being committed.
The "git commit -m" command is used to commit changes to a Git repository.
This command takes a message as an argument, which is used to describe the changes being committed.
5. git push
The git push command is used to push commits from a local repository to a remote repository.
This command can be used to push changes to a remote branch or to a remote repository.
The git push command is used to push commits from a local repository to a remote repository.
This command can be used to push changes to a remote branch or to a remote repository.
6. git pull
The git pull command is used to fetch and download content from a remote repository and update the local repository to match the remote.
The git pull command is used to fetch and download content from a remote repository and update the local repository to match the remote.
7. git branch
The git branch command is used to create, list, rename, and delete branches.
When you create a new branch, it is based on the current branch.
You can also specify a different branch on which to base the new branch.
For new branch use: git branch <branch_name>
The git branch command is used to create, list, rename, and delete branches.
When you create a new branch, it is based on the current branch.
You can also specify a different branch on which to base the new branch.
For new branch use: git branch <branch_name>
8. git checkout <branch_name>
The git checkout command is used to switch between different branches in a git repository.
To create a new branch use: git checkout -b <new_branch>
The git checkout command is used to switch between different branches in a git repository.
To create a new branch use: git checkout -b <new_branch>
9. git merge <branch_name>
The "git merge" command is used to join two or more development histories together.
This is often done in order to combine changes made on separate branches.
It can also be used to simply update a single branch with the changes from another.
The "git merge" command is used to join two or more development histories together.
This is often done in order to combine changes made on separate branches.
It can also be used to simply update a single branch with the changes from another.
If you like this post, you can bookmark and tag it by replying with @SaveToBookmarks #git
You can view your bookmarks on savetobookmarks .com
You can view your bookmarks on savetobookmarks .com
@SaveToBookmarks That's all, guys.
If you found this list useful, consider:
โ Follow @csaba_kissi for more content like this
๐ Enable notifications ๐
๐ Retweeting the first tweet.
Thanks for your support, guys! ๐๐ค
If you found this list useful, consider:
โ Follow @csaba_kissi for more content like this
๐ Enable notifications ๐
๐ Retweeting the first tweet.
Thanks for your support, guys! ๐๐ค
Loading suggestions...