With no arguments, shows a list of existing remotes. Several subcommands are available to perform operations on the remotes. By default, only tags on fetched branches are imported see git-fetch[1]. See also the set-head command. This option only makes sense in bare repositories, because a fetch would overwrite any local commits.
All remote-tracking branches and configuration settings for the remote are updated. All remote-tracking branches and configuration settings for the remote are removed. Sets or deletes the default branch i. Having a default branch for a remote is not required, but allows the name of the remote to be specified in lieu of a specific branch. Changes the list of branches tracked by the named remote. This can be used to track a subset of the available remote branches after the initial setup for a remote.
The git error "Fatal: not a git repository" occurs when you attempt to run a git command but weren't inside a git repository. Read this article for ways to solve this error. The git error "Fatal: refusing to merge unrelated histories" occurs when a user action, such as git merge, can cause the rewriting of history data. It is git's way to ensure the user fully understands the result of their action.
Read on how to solve this error. Table of Contents. Resources Git error - Fatal: remote origin already exists and how to fix it. In Git, "origin" is a shorthand name for the remote repository that a project was originally cloned from. More precisely, it is used instead of that original repository's URL - and thereby makes referencing much easier.
Note that origin is by no means a "magical" name, but just a standard convention. Although it makes sense to leave this convention untouched, you could perfectly rename it without losing any functionality. In the following example, the URL parameter to the "clone" command becomes the "origin" for the cloned local repository:. No need to remember all those commands and parameters: get our popular "Git Cheat Sheet" - for free!
To make working with Git easier, you should try Tower - the popular Git client for Mac and Windows 30 days for free! You'll find the most important commands on the front and helpful best practice tips on the back. Over , developers have downloaded it to make Git a little bit easier.
0コメント