Sort notes-common Git commands, notes-common git commands
In Windows, configure SSH to connect to GitHub/GitLab ==> when you need it, follow the search criteria Baidu.
Echo "content"> file name ==> string output.
1. Global Config
Common Git commands and common Git commands
Mkdir:XX (create an empty directory XX refers to the directory name)
Pwd:Shows the path of the current directory.
Git initChange the current
file Cat Id_rsa.pub 2,
Add Warehouse
Copy warehouse address, for download to local if you want to delete the warehouse, it is also very simple eight,
Build Oschina Remote Warehouse
1.
Create a warehouse
Register a Oschina account: Https://git.oschina.net Warehouse Address
Add Project group members
Then you need to set up Git's mailbox and user name at the terminal, or you won't have access to the repository.2.
Delete Warehouse
Source Control--
upload the code to the GitHub remote warehouse
Git push-u origin Master11
After execution, if there is no exception, wait for execution to upload success, the middle may let you enter username and password, you just enter GitHub account and password on the line
common errors and solutions for git command line Operations
If you enter $
fix, and a specialized new function, merge merge after stabilization
Git branch bug_fix # create branch named bug_fix
Git checkout bug_fix # Switch to bug_fix
Git checkout master # Switch to the primary Repo
Git merge bug_fix # merge the bug_fix branch with the current Branch
# If you have a remote branch, y
Common Git commands and git commands
Since work, the source code management tool has used SVN, TFS, Git, and finally exclusive Git
This blog summarizes the
Common git operation commands and git operation commands
Record the common Git command operations in the work. A project is often developed by multiple people in collaboration. Using
Common Git commands and git commands
This article is in the study of the summary, welcome to reprint but please note the Source: http://blog.csdn.net/pistolove/article/details/47315569
Recently, I have been studying common
Common git commands and git commands
1. Create a branch that is identical to the remote dev branch and switch
Git checkout-B zhaojigangDev origin/dev
2. Create a branch identical to the remote dev branch, track the remot
/learngit.gitSecond, git common commands"Basic Command"
mkdir creating a File cd file entry
Git init turns this directory into a repository that git can manage, generating. git files
g
modified content. In this case, Git does not know what line of content is needed, so you have to decide what you want.Once the resolution is complete, it can be submitted normally.
Common git commands
View File diffgit diff # Compare current file and staging area file diff git
Git: basic operations of Common commands and git operations
I have been using cvs, svn, or the little turtle client for development. I have never heard that Git is powerful and useless, git is also used by the company. At this tim
in co-development.For example:4.4. Git FetchDownload the code from the server's warehouse. (Interacting with the server, downloading the latest code from the server)The equivalent of getting the latest version from remote to local, not automatically merge, more secure than git pull.Use this method to get updates on the server.For example, if you use Git checkout
Prior to using GIT, SVN version management was used, and the biggest difference with SVN is that git has two warehouses, one is a local repository, one is a shared repository on a server, and a local repository is unique to every developer, even if commit commits to the local repository only. This is just one of the advantages of Git's popularity, and the version management tools developed by Linux authors
Common git commands, git
Git statusGit add puts the workspace in the hold ZoneGit commit puts the hold zone into the version ZoneGit add submits all modified files to the hold ZoneGit commit-m "Remarks written when submitting" no referenceGit commit-a-m "Write remarks upon s
] Github.com:robbin/robbin_site.git # Set up the repository address
Git push-u Origin Master # client First Commit
Git push-u origin Develop # First submits the local develop branch to the remote develop branch, and the track
git remote Set-head Origin Master # Set the remote repository head to the master branch
You can also command settings to trace th
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.