I have organized several test projects under GitHub and intend to integrate Python-related Program Put it under Linux for maintenance. So I learned about the GIT command line tool.
Git add# Put files into the local database
Git commit-M "Log message"-# Submit the modification to the local database-A indicates all, or you can choose to submit it with the file name or list.
Git log# View log information git log-N3View the latest 3 logs
Git status# Viewing the local file status
Git Branch# List local branches
Git branch-R# List remote branches
Git branch-# Local remote branches are displayed
Git diff # View File modifications (not used yet)
Git show# More submitted information
Git show 6eb2c1a15a2f52a147cf2d491fdd1d113d218a43# (Submission number) See the content modified in this submission.
When we need to submit the local database to the remote server, we need to add a remote point or configure it in. Git/confige.
Git remote addRemote name http://github.com/<username>/<reponame>. Git # Add a remote Branch
Git push origin master push# Push branch to remote
Git remote set-URL
# Modify the URL address of the remote branch, for example, the address changed from http to SSH
Problems occurred during git push:
Because HTTPS is used for clone, I can only use SSH for push in Linux, so I use git remote set-URL sshurl to change it to an SSH address, or directly go. git/confige
I learned how to establish SSH and GitHub. Reference: https://help.github.com/articles/generating-ssh-keys