"Graphic" Git learns ten steps to integrate git from Android studio to push local libraries to remote libraries

Source: Internet
Author: User

Objective

The reason why I wrote this article is to make a memo for myself, but also hope to help some beginners.

The first step of the graphic step

Open Android Studio (hereinafter referred to as) versioncotrol-"Git

Step Two

Cut to GitHub

Step Three

Fourth Step

In select directory for git init , choose to initialize your local git library.

The. Git directory will then be generated in your local project

Fifth Step

Open git bash to navigate to the above directory

Sixth step

Here's the point, Add a new git remote library , like this:

https://[user]@[server_address]/[git_repo_url]

My address is:

https://github.com/dengfengdecao/PhotoGallery.git

If you already have a target warehouse, you might want to execute the command:
Git set-url origin Https://github.com/dengfengdecao/PhotoGallery.git

Now add a file to the GIT library

add.gitignore

This is done because we need to add any files to our Git repository to start our first commit (when you initialize this git repository through as, the as will automatically create this file)

And then commit this change to the Git repository ,

commit -m "Initial Commit"
Seventh Step

Push to the remote library, using tags -set-upstream to tell the local git repository the destination of the remote library

-push--set-upstream origin master

If you already have a target warehouse, you might want to execute the command:
git pull origin master

The following will be output:

This is the end of the bash command!

Eighth step

Enter as, right click on the top of your project name, select Git>+add

This will add all the project files to the GIT repository (corresponding command git add )

Nineth Step

Select Git>commit Directory Submission Catalog

In the Commit Changes dialog box, confirm all the changed files for your project and add the description information in the commit message

Select Submit to local git library.

Tenth step

Right-click top Item Select Git>repository>push ...

Push can see the following information.

Finally, if an error message appears:

Fatal:unable to access ' https://github.com/[user]/[repo].git/': Failed connect to github.com:443; No Error

Then multiple push several times, if not successfully set up the agent (if you want to FQ):

git config --global http.proxy [server]:[port]

If there is a problem with the proxy settings, see this article:

Http://stackoverflow.com/questions/18356502/github-failed-to-connect-to-github-443-windows-failed-to-connect-to-github

Copyright NOTICE: Welcome Reprint! Please specify the source: http://blog.csdn.net/u011726984

"Graphic" Git learns ten steps to integrate git from Android studio to push local libraries to remote libraries

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.