Git Workflow, Best Practices

Git Workflow, Best Practices

it is an open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency, and also software for tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows.

dccb237f-7b5b-4a04-9b7f-b43243bf7db3.png

Basic commands git add is a command used to add a file that is in the working directory to the staging area.

  • git commit is a command used to add all files that are staged to the local repository.

  • git push is a command used to add all committed files in the local repository to the remote repository. So in the remote repository, all files and changes will be visible to anyone with access to the remote repository.

  • git fetch is a command used to get files from the remote repository to the local repository but not into the working directory.

  • git merge is a command used to get the files from the local repository into the working directory.

  • git pull is the command used to get files from the remote repository directly into the working directory. It is equivalent to a git fetch and a git merge.

1223ab98-e403-400f-8148-13e92b96854e.png