8/28/2023 0 Comments Git fetch vs checkoutcheckoutĬhecking out a branch updates the files in the working directory to match the version stored in that branch, and it tells Git to record all new commits on that branch. This gives you a chance to review changes before integrating them into your copy of the project. The resulting commits are stored as remote branches instead of the normal local branches that we’ve been working with. The “git fetch” command imports commits from a remote repository into your local repo. The “git branch” command lets you create, list, rename, and delete branches. New commits are recorded in the history for the current branch, which results in a fork in the history of the project. branchĪ branch represents an independent line of development. The “git push” command is to transfer commits from your local repository to a remote repo. Snapshots are committed to the local repository, and this requires absolutely no interaction with other Git repositories. The “git commit” command commits the staged snapshot to the project history. It tells Git that you want to include updates to a particular file in the next commit. The “git add” command adds a change in the working directory to the staging area. Cloning automatically creates a remote connection called origin pointing back to the original repository. The “git clone” command copies an existing Git repository, e.g. It can be used to convert an existing, unversioned project to a Git repository or initialize a new empty repository. The “git init” command creates a new Git repository. Git is a Distributed Version Control Systems.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |