How to Submit the code to github or gitlab

A tutorial to create a project submitted to github or gitlab

Create a new project in gitlab:

20161221101832138.png

After creating it will generate a .Git path.

 Switch the local project file directory:

 

  1. Right click on git bash
  2. In git bash inside the implementation of  git init initialization
  3. git add .  Submitted to the current
  4. git commit -m “init commit”

Add a remote association

git remote add origin Your remote git address when creating a project.

Push to the remote repository

git push --set-upstream origin master

After the above are completed will get the following:

  • Generate local branch master
  • Remote Warehouse associated with the local repository
  • A remote branch associated with a local branch
  • The local code is all submitted to the remote repository, and others can share it

Refresh gitlab to view the submitted items

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: