Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Share and show your code on GitHub     - How to use the Linux command compress JPEG images (Linux)

- Apache Tomcat integration and resin (Server)

- Ubuntu 32 compile Android 4.0.4 Problems (Linux)

- How to use OpenVPN and PrivacyIDEA build two-factor authentication for remote access (Server)

- Log4j configuration file Explanation (Linux)

- Talk about Java in the collection (Programming)

- Linux desktop system using the remote server in clear text ssh password (Server)

- Ubuntu 14.10 PPA installed Android Studio (Linux)

- Use rfkill soft-switching and Bluetooth wireless capabilities in Linux (Linux)

- Install Java 8 on Ubuntu using PPA (Linux)

- To install OwnCloud 7.0.4 under Ubuntu (Linux)

- Oracle Standby Redo Log experiment (Database)

- Linux operating system security settings initial understanding (Linux)

- SSH mutual trust configuration (Server)

- Let the router be your security barrier against external attack (Linux)

- RHEL 7.1 compile and install Ganglia 3.7.1 (Server)

- Android development, may cause a memory leak problem (Programming)

- Java annotations entry automatically generates SQL statements (Programming)

- Oracle table space usage monitoring (Database)

- Ceph cluster disk is no workaround for the remaining space (Server)

  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:

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
- Editor of the popular Linux Gvim (Linux)
- What have we learn from the front-end application Nodejs (Programming)
- Use in Linux ipmitool tool (Linux)
- Security of data to create a safe .mdb database (Linux)
- Oracle 11g contraction table space error ORA-03297: file contains used data beyondrequested RESIZE value (Database)
- CentOS6.x and Windows XP and Windows Server 2003 Open IPv6 related matters (Linux)
- Basic Operation Linux files and directories (Linux)
- Let Mac OS X dedicated high-speed mobile hard disk can also be read in Linux (Linux)
- Use apt-p2p up a local Debian package cache (Server)
- Oracle utilized undo data recovery operations (Database)
- Ubuntu install snmp packets Unlinked OID in IPATM-IPMC-MIB: marsMIB (Linux)
- xargs Detailed description (Linux)
- Ubuntu 14.04 install Nmap 6.46.1 (Linux)
- JavaScript original values and complex values (Programming)
- Installation and use of Linux Sniffer tool Tcpdump (Linux)
- Java concurrent programming using the synchronized keyword ReentrantLock alternative primitive (Programming)
- Linux command in the dialog whiptail (Linux)
- Install Websphere MB required system rpm package under Linux (Linux)
- DataGuard a hardware issue warnings found (Database)
- Install DB2 V10 and Data Studio V3 under Linux (Ubuntu) environment (Database)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.