Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Share and show your code on GitHub     - RHEL 7.1 compile and install Ganglia 3.7.1 (Server)

- CentOS 6.5 install VNC-Server (Linux)

- MySQL fuzzy query: LIKE and REGEXP pattern mode (Database)

- CentOS 6.x systems installation + NIC driver installation (Realtek PCIe GBE Family Controller for Linux) (Linux)

- RHEL6.4 one key installation Redmine (Linux)

- CentOS6 5 Configure SSH password Free (Linux)

- Analysis of Java exception (Programming)

- Lua study notes under ubuntu (Linux)

- Ubuntu the ARP (arptables) (Linux)

- Find details block device with Linux blkid command (Linux)

- Linux Oracle environment variable is invalid Problem Solving (Database)

- How do you change the default browser and Email Client in Ubuntu (Linux)

- The new features of MySQL 5.7 Generated Column (index function) (Database)

- How to track performance issues when using the Unity Game Development Android (Programming)

- The text formatting tools awk Linux system (Linux)

- Python implementation Bursa transition model (Programming)

- The istgt PSD on ported to Mac OS X (Linux)

- Java Foundation - Getting Start (Programming)

- pkg-config to use (Linux)

- Ubuntu 64-bit installation Adobe Reader 9.5.5 (Linux)

 
         
  Share and show your code on GitHub
     
  Add Date : 2016-09-17      
         
         
         
  Recent love Web programming, so look for a variety of code, and then discovered the GitHub site, if you know that Google Code, then you know what this is doing a GitHub. But GitHub is used mainly for Git distributed version-based library management system, you can save and manage their own code, and is mainly used to develop the code. But for me, Git control system is also more difficult to grasp, or the development of small systems is not yet need it, so I put GitHub as share and display tags.

After registration you will have GitHub 0.3G free space, but can only create a public project, which also meet the code sharing purpose of my favorite touches its code to show the way, you can browse the code, the code is the result of high bright, add line numbers treated, very beautiful, first-class experience, such as this Webpy hosting place. As people want to know your code, you can choose to directly browse online're interested, you can also directly download the archive, or directly to a local Git clone.
Because GitHub is based on the Git version control system, so you can modify the code to upload something, you need to use the Git tools. I have here is mainly used to share and display code, so do not want to elaborate too much in version control, the following briefly explain how to create a new project on GitHub, as well as his own code passed up. Below the premise that you have registered GitHub and download and install Git - Git download, Windows version download.

Upload Share Code

1. Establish project on GitHub

After logging in GitHub, where you can find a button on the right by the "New Repository", after click, fill in the project name, description, and after the site can create, and then there will be a prompt page, note the similar git @ github. com: XXX / XXX.git address, this is the address you this project.

2. Configure Git, and upload the code

After you install Git is successful, if it is under Windows, choose Git Bash, do everything, may start a little trouble on the command line, but it was a few command line, with a few friends to remember. First, initial settings Git:

1 git config --global user.name "Your Real Name"
2 git config --global user.email you@email.address
And then make the most troublesome step, you need to upload files to the Git GitHub's system, may need an SSH key authentication, the following began to generate a key and submit key. Open Git Bash, create SSH key:

1 ssh-keygen -C 'your@email.address' -t rsa
Then you enter the SSH key to the storage location, you can not care, directly enter the default path. Then enter the password you want, SSH key is generated. Now you will need to submit the Key to GitHub, first open the Key to save the position, there will be three files, find id_rsa.pub, open with a text editor, copy all the characters inside. To GitHub, found in the upper right toolbar Account Settings. On this page there is a SSH Public Keys tab, select Add another public key. You can easily fill a Title, Key to paste the characters submitted.

After completing these tasks, you can upload your own code. Find their upload code to share a folder, right click and select Git Bash, or enter this folder in the Git Bash. The establishment of a warehouse:

1 git init
Select the files you want to add into the warehouse:

1 git add.
Usually if you want to share all the code in this folder, and then add in the back plus ".", The above example is such that if the specified pass, simply put. "" Change the file name, and now just chose to add a file repository, the following is added into the warehouse:

1 git commit -m 'Test'
-m Back with an argument, an explanatory, the tags are submitted to GitHub, the code will be displayed on the file information display shows the following figure marked places.

Out for so long, only now beginning to be uploaded to the local repository GitHub, and the following two commands to get the problem:

1
2 git remote add origin git@github.com: XXX / XXX.git
3 git push -u origin master
This git@github.com: XXX / XXX.git is created above the project is to generate address. Now open your project site, you can find that your code has been demonstrated out. If you want to update the code, just repeat the above it.

If you submit sensitive information, such as the code set their own password forgot what to delete uploaded go up how to do? After revising upload still history, delete history using Git looks like a lot of trouble, so they use it to delete items, delete and re-upload. Remove the top right of the desired item is found on GitHub site admin button, go to the right at the bottom there is a delete button, so that you can delete.

This article does not cover Git and sharing features such as code development, because it is only to those who, like me, being only share code reference, if you want to learn more about Git and GitHub usage
     
         
         
         
  More:      
 
- Is Linux the most secure operating system (Linux)
- Oracle Database Restore (Database)
- C # how to generate a folder or file automatically rename (Programming)
- Android annotation support (Support Annotations) (Programming)
- GNU / Linux enable Intel Rapid Start (Linux)
- The file name is garbled or deleted files with special characters under Linux (Linux)
- HDFS Distributed File System Resource Manager Developer summary (Server)
- RHEL6.4 x86_64 build SVN service (Server)
- Linux System Getting Started Learning: the Linux Wireshark interface dead solve (Linux)
- Oracle 11g Export guide problem not an empty table (Database)
- Red Hat Linux mount U disk (Linux)
- MySQL + Heartbeat + DRBD deployment architecture (Server)
- WordPress blog installation Redis Cache (Server)
- Common data structures and functions of Linux process scheduling (Programming)
- Gentoo: existing preserved libs problem solving (Linux)
- Ubuntu 14.10 / 14.04 / 12.04 virtual users to install the printing software Boomaga (Linux)
- Understand ASP.NET 5 running the command: DNVM, DNX, and DNU (Server)
- Analysis RabbitMQ cluster (Server)
- Simple RPM package production (Linux)
- Create the container and run the application Docker (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.