Local Environment:
IntelliJ idea 2016.1.2, git client, GitHub account ...
Start Building git project ...
1. After logging in to github.com, click to select as shown:
2. Add the creation information as follows:
Repository Name: Warehouse names
Description (optional): Introduction to Warehouse Description
Public, Private: Warehouse permissions (publicly shared, private, or designated collaborators)
Initialize this repository with a README: Add a readme.md
Gitignore: A repository type that does not need to be versioned, corresponding to the makefile. Gitignore
License: Certificate type, corresponding build file license
Based on my own configuration, my
3. Click on the project clone or dowload an address will appear to copy the HTTPS address.
4. Local operation (not necessarily initialized beforehand). Go to the project directory right click and choose Git Bash here to enter the interface.
5. Download git code to local (use git HTTPS project address).
6. Local operation. The local project folder will have an additional project folder to move the original files to the newly downloaded project directory.
(according to its own circumstances, here.) I only use the SRC, pom.xml files to move to the new directory, the others do not move. )
7. Change the new directory to ignore the file. Gitignore. Can be configured according to your own project.
# Compiled Source ####################*.com*.class*.dll*.exe*.o*.so# Packages ############## It ' s better to unpack these Files and commits the raw source# git has it own built in compression methods*.7z*.dmg*.gz*.iso#*.jar*.rar*.tar*.zip*.war# Logs and databases #######################*.log#*.sql*.sqlite# OS generated files #######################. Ds_store.ds_store?. _*. spotlight-v100.trashesehthumbs.dbthumbs.db# Eclipse project file #########################. project.settings.classpath.metadata# idea Project file ######################.idea*.ids*.iml*.iws*.ipr# Maven Generated files ######################### #target # Others ###########./build./dist
8. Enter the command CD Maven-ssm-demo and go to GitHub to download project projects.
9. Enter the following code to complete the rest of the operation:
git Add. (Note: Don't forget the back., this action is to add the files under the Maven-ssm-demo folder)
(This step is handled with caution, as I have previously submitted the. idea. iml file to GitHub, causing versioning to record changes, and I re-manipulated it again, step 6 is ready to operate directly)
git commit-m "Submit Information" (Note: "Submit information" in exchange for your needs, such as "first commit")
Git push-u Origin Master (Note: This is done to push the local repository to GitHub, this step requires you to enter your account and password)
10.First Blood.
(Congratulations on your 1 blood.) Basically, it's done. The local directory is organized and re-imported on the line. Feel indifferent can also ignore)
Upload your local code project to GitHub using Git.