It is equivalent to the Git init command when working with a remote repository. The command downloads the remote repository to the computer.The git clone command is used to create a local working copy of an existing remote repository.The connections here are not like direct links into other repositories, but as bookmarks that serve as convenient names to be used as a reference.The git remote command is used to create, view, and delete connections to other repositories.Git Commands: Working With Remote Repositories However, these are popular and basic git commands used by developers. It is used to merge the changes in the staging branch to the stable branch.The command combines the changes from one branch to another branch. The git merge command is used to integrate the branches together.# Checkout and create a new branch with that name git checkout -b # Checkout an existing branch git checkout The command works on three separate entities: files, commits, and branches.The git checkout command is used to switch branches, whenever the work is to be started on a different branch.# List all remote or local branches git branch -a The command enables adding and deleting a branch.The git branch command is used to determine what branch the local repository is on.Git config -global user.name “any user name” When git config is used with -global flag, it writes the settings to all repositories on the computer.This specifies what email id and username will be used from a local repository. The git config command is used initially to configure the user.name and user.email.Also, if there are no changes, it will show the message no changes to commit, working directory clean. If the files are in the staging area, but not committed, it will be shown by the git status. The command provides the current working branch.The git status command tells the current state of the repository.The command "git commit –m " allows you to describe everyone and help them understand what has happened.The commit command makes sure that the changes are saved to the local repository. Before running the commit command, "git add" is used to add any new or modified files.Add command is used after checking the status of the files, to add those files to the staging area.Once the repository is initialized, the process of creating other files begins. git folder is created in the directory with some subdirectories. After the git init command is used, a.The command git init is used to create an empty Git repository. Git Commands: Working With Local Repositories There are separate Git Commands that work on different types of repositories. This repository is used by all the team members to exchange the changes made.īoth repositories have their own set of commands.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |