Some Simple And Important Git Concepts For Developers
GIT
Git is a version control system that makes it easier to track changes to files. When you edit or update a file, git will tell you what changed, who changed it, and why.
REPOSITORY
A repository is a database for a project. Think of a repository as a store for your projects, files, folders, or contents.
COMMIT
A commit is a change to a file or files it's like when you save a file, but with Git, every time you save, it creates a unique ID that allows you to keep a record of changes.
BRANCH
A branch in Git is simply a lightweight movable pointer to one of these commits. The default branch name in Git is master. As you start making commits, you're given a master branch that points to the last commit you made. Every time you commit, the master branch pointer moves forward automatically.
PUSH
The git push command is used to upload local repository content to a remote repository. Pushing is how you transfer commits from your local repository to a remote repo. Remote branches are configured using the git remote command. Pushing has the potential to overwrite changes, caution should be taken when pushing.
PULL
Pull is used to fetch and download content from a remote repository and immediately update the local repository to match that content.
MERGE
If we are building new features and created a new branch for the same from master or any other branch. After completing that feature development we need to merge that branch to the actual parent branch.
CONFLICT
While merging branch if some other developers worked on in the same file and auto-merge is not possible. In that case, there is conflict in that file for own code and others code, we need to resolve that before the merge.
Answers ( 0 )