As a very useful free version management tools, GIT has many advantages. Recent work has encountered a problem a lot of GIT.
Recently I took over a project, the first time the source code uploaded to the cloud when the first write operation process:
1. Create a warehouse in the cloud on the code, I create private, the process is relatively simple, not repeat them
2. In the idea of the first click Import into Version Control -----> Create Git Repository
3. Right-item ----> choose Git ---> select add
4. then Commit Directory, note that there are very easy to make a mistake
4. Select an item ---> push
5. Click push, you thought it was full of joy witness the miracle moment, and then you explode
6. error push rejected
For this reason wrong is the first submission, they do not accept your warehouse, your never seen before, I can let you go to hell
Solution:
1. First, find your code cloud warehouse to see if there README.md file to initialize its own warehouse, or certainly not get uploaded
2. Find your local repository folder, the files have hidden .git folder (I recommend creating a higher level in the folder of the project when you create a local repository), then place in the blank, right -> Git Bush Here ,
He began to knock, first step: git pull Step two: git pull origin master third step:git pull origin master --allow-unrelated-histories,
Note that this master and - there is a space between
3. If you see the following screen, that you like, you can right push in the idea of perfect. If you do not see this screen, you probably have a project file is not submitted, or your project no README.md file to initialize
Pull code from github or other repository (httpsthe way) git clone Git address Submit code git add . . means all files G...
Title: git-lfs notes comments: true categories: notes tags: git lfs tools github abbrlink: 68597cc5 date: 2018-07-04 12:47:40 Foreword I always wanted to find a file that can store a large file and it...
We often or occasionally encounter problems during daily git usage. 1. Normal operation process 2. When we modified the code under the wrong branch, we want to submit this part to the specified branch...
1. A brief introduction to GitHub. GitHub has a very powerful function. It is a very heavy task to create a library to write code on the server. We have a main repository on the GitHub server to store...
1. Add a submodule and execute it in the top level directory of the project.Git submodule add repository address local path 2. When the command execution is completed, a name will be generated under t...
GitHub common concepts 1, Repository warehouse That is, their own projects, each project corresponds to a warehouse 2, Star collection Collect other people's projects 3, Fork copy clone project Clone ...
Configuration before initial run Git comes with a git config tool to help set configuration variables that control the look and behavior of Git. These variables are stored in three different locations...
Use of the environment: win10 Use Version: First, know Git Git is the world's most advanced distributed version control system, then it has no central server, each person's computer is a complete repo...
GIT use notes 1. Create a server git repository git init --bare Creating a repository directory as a server, such as server 2. Cloning a remote server in the local repository git ...
This happened last week several things: Google released SHA-1 collision secure encryption examples Cloudflare leaked encrypted data networking session linux kernel vulnerability CVE-2017-6074 Encrypti...