Reading Flaskweb Development: Python-based Web application development, after downloading the source code git clone https://github.com/miguelgrinberg/flasky.git
Try switching to commit history 1a, $ git checkout 1a, Error:
Fatal:not a git repository (or any of the parent directories):. git
This tip indicates that you are not currently in a git repository directory and need to switch to Flasky below:
$ pwd
/c/users/dell/documents/github/flasky
Then execute:
$ git Checkout 1a
Note:checking out ' 1a '.
You're in the ' detached HEAD ' state. You can look around, make experimental
Changes and commit them, and you can discard any commits do in this
State without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits your create, may
Do and later by Using-b with the checkout command again. Example:
Git checkout-b <new-branch-name>
HEAD is now at 7e1e156 ... Chapter 1:initial Version (1a)
[Email protected] ~/documents/github/flasky ((1a))
1. Git tag-a ' tag1 '-m ' remarks tag1 ' HEAD//Add a tag in local code
2. Git push origin TAG1//Push the code to this tag into the repository
3. Git show Tag1//view tag content
4, git tag//See which tags
5, Git tag-d tag1//Delete tags
git, like any other version control system, can tag (tag) to mark a point as a version number, such as 0.1.3, v0.1.7, ver_0.1.3. After the development of the program to a stage, we need to label, release a version, the role of markup is obvious.
Here's a look at the action commands for tagging, sharing tags, removing tags.
hit label
git tag-a 0.1.3-m "Release version 0.1.3″
Explanation: git tag is the command
-A 0.1.3 is to add a label named 0.1.3
-M followed by a note of the label
The tag operation occurs after we commit to the local repository. A complete example
git Add.
git commit-m "fixed some bugs"
git tag-a 0.1.3-m "Release version 0.1.3″
share the commit tag to the remote server
git push Origin master
git push Origin--tags
The –tags parameter means that all tags are submitted to the server side, and the normal GIT push Origin master operation does not push the tag to the server side.
command to delete a label
git tag-d 0.1.3
Remove the label from the remote server
git push origin:refs/tags/0.1.3
Git:fatal:Not a git repository (or any of the parent directories):. git