You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first command is almost obvious: newcomers to git only have to learn that "origin" is the conventional name of a remote repository, and thus it may be different in some cases. But explaining this may be deferred to git's official docs.
The alternative option is confusing for me even though I've been using git professionally for many years. The explanation is as follows:
Deleting References
You can also use the refspec to delete references from the remote server by running something like this:
$ git push origin :topic
Because the refspec is <src>:<dst>, by leaving off the <src> part, this basically says to make the topic branch on the remote nothing, which deletes it.
Or you can use the newer syntax (available since Git v1.7.0):
Having short explanations like this, accompanied by links to related parts of official docs, would prevent a lot of cargo-cult-like behavior many git users are falling into.
Arguably, all this deeper knowledge can be found by reading the official docs but having quick access to only related parts would be very convenient for someone like me, who doesn't start with reading a whole book before trying something, but prefers to learn hands-on, step-by-step.
The text was updated successfully, but these errors were encountered:
For ease of memorization and education purposes, some of these tips should have at least short explanations.
Example:
The first command is almost obvious: newcomers to git only have to learn that "origin" is the conventional name of a remote repository, and thus it may be different in some cases. But explaining this may be deferred to git's official docs.
The alternative option is confusing for me even though I've been using git professionally for many years. The explanation is as follows:
(from https://git-scm.com/book/en/v2/Git-Internals-The-Refspec)
Having short explanations like this, accompanied by links to related parts of official docs, would prevent a lot of cargo-cult-like behavior many git users are falling into.
Arguably, all this deeper knowledge can be found by reading the official docs but having quick access to only related parts would be very convenient for someone like me, who doesn't start with reading a whole book before trying something, but prefers to learn hands-on, step-by-step.
The text was updated successfully, but these errors were encountered: