directory that's him!You can also open the project catalog and see the. git folder as well, if we want to delete the code repository just remove the folder!2. Submit Local CodeAfter creating the code warehouse, the next step is to submit the code, we use the Add command to add the content to be submitted, and then commit the commit is really to execute the opera
The previous section mentioned the concept of the warehouse, in fact, after initializing git, git divides the local space into two parts, part of the workspace (working directory), the Studygit directory is the workspace to store our own files, and the other is the repository (Repository), also known as a warehouse , has a.
Use and submission of Git local code library
Git is a good thing, but it is not easy for beginners to use because it involves many things that cannot be understood by beginners at a time. Unfortunately, I am a newbie, so here I will not talk much about the principles of git, what kind of stages should be done, first fr
1. Create a new project (folder) and put it in the project you want to upload;Test upload github is my new folder, Es6-setting-up-the-environment is the project I want to upload;2. Go to D:\test upload GitHub, right-click Git bush here3. Enter git initTurn this folder into a repository that git can manageYou'll see a more. gi
I. Conflict generation: Both local and remote have changed since the last git sync (upload)Two. Handling1. Discard local, using remote:Git checkout conflicting files and their pathssuch as: Git checkout bzrobot_navigation_meta_packages/map_server/src/access_map_server.cpp2. Man-made merge (
Create a new remote repository (empty)
Create a new remote repository
Set the name of the remote repository and create
Set the warehouse nameRemember : If we add the Readme and. Ignore files when we create the remote repository, we need to perform the operation after we have associated the warehouse. pull
Create a local folder locallyTo create a folder locally
Use terminal to enter the current folder directorycd /Users/
The internal structure of git local repository (this article does not involve remote repositories) is as follows:
This is an appengine project, just cloned from the remote repository. In this directory, all except the. Git directory are counted as the work zone .. There are a lot of things in the GIT directory. He
for files
Method put a file under version control. Here is an example. Select the Solver. py file and press Ctrl + Alt +.
The Solver. py file turns green, meaning version control has been performed, but it is not hosted yet:
6. Submit the local version Library
In the Changes tool window, select the Solver. py file, press Ctrl + K, enter information, and click Commit.
Open the Log tab of Changes tool window to view details;
7. view the current
origin is known as the remote repository.
"Push to Remote library"
Pushing the contents of the local library to the remote, using the git push command, is actually pushing the current branch master to the remote.
Since the remote library is empty, when we first push the master branch, with the-u parameter,
Git allows you to view local branches, create branches, upload branches, submit code to branches, and delete branches.Git to view local and create branches and upload branches to the server
The command operations in the git command line are as follows:
Welcome to Git (versio
"
Establish an association with a remote github repositoryThe remote warehouse address is the new project address that you just added on GitHub https://github.com/user name/project name. Git$ git remote add origin https://github.com/用户名/项目名.git
Sync to a branch of a new project in remote GitHub (default is General
management space of Git.
WorkSpace: Directories and files that require version control through Git, which make up the workspace.
. Git: A directory that holds git management information and is created automatically when the repository is initialized.
Index/stage: Staging area, or call to submit the update
version control is already in place but not yet managed:6. Submit the Local repositoryIn the Changes tool window, select the solver.py file, press Ctrl+k, enter the information, and click Commit. Open the Log Tab tab of the Changes tool window to view;7. View Current BranchTwo different ways:First, use the main menu command vcs→git→branches, in the popup window to view:Second, use the
Git version 1.9.6
Git code submission hierarchy
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/49/CE/wKioL1Qa5-Xyp1LVAADqrDRk-Xk325.jpg "Title =" g.jpg "alt =" wKioL1Qa5-Xyp1LVAADqrDRk-Xk325.jpg "/>
1. modify local code to view differences
Ii. Remove code
Iii. Rename code
1.1 When we modify the
Add Comment
$ git commit -m "注释内容"
Establish an association with a remote github repository
The remote warehouse address is the new project address that you just added on GitHub https://github.com/user name/project name. Git$ git remote add origin https://github.com/用户名/项目名.git
Syn
The previous companies are using SVN, long time to feel very handy. Now the company uses GIT to manage the code, so learn the basic use of **git. First, we introduce a simple comparison of SVN and git:
1,SVN is the most used version control management tool.
is a centralized version-management tool. All files are centralized on a single server, the user is updated
The original link please indicate:http://blog.csdn.net/u011974987/article/details/52913925This article is from: "Stromxu's Blog"Welcome to visit my blog, add a bit of popularity ~~xuhao's blog phenomenon Description:
I have changed the code on the existing branch, after using Git to submit the local code, Sourcetree above no record, I wondered, I originally thoug
Start a new project by building a new library in an existing Git repository and uploading the local git repository to the remote server's Git repositoryfirst , create a new folder on the local ABC, enter into ABC, and then git ini
file would have their original line endings in your working directory.WARNING:LF is replaced by CRLF in Node_modules/accepts/license.The file would have their original line endings in your working directory.[Email protected]/d/documents/hbuilderprojects/test (master)$ git statusOn Branch MasterYour Branch is based on ' Origin/master ', and the upstream is gone.(
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.