git 初步使用 – 提交代码
** 1.在该目录下新建项目,然后可以关闭编辑器,直接在该文件目录下删除不需要文 件。然后在命令行输入以下命令可以查看当前修改
zhangsuixu@DESKTOP-8JCNGRL MINGW64 /i/Happy/Happy (master) $ git status On branch master Your branch is up-to-date with 'origin/master'. Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: Happy/.gitignore new file: Happy/HappyClient/.gitignore new file: Happy/HappyClient/build.gradle new file: Happy/HappyClient/proguard-rules.pro new file: Happy/HappyClient/src/androidTest/java/zhangsuixu/happy/com/ExampleInstrumentedTest.java new file: Happy/HappyClient/src/main/AndroidManifest.xml new file: Happy/HappyClient/src/main/java/zhangsuixu/happy/com/MainActivity.java new file: Happy/HappyClient/src/main/res/layout/activity_main.xml new file: Happy/HappyClient/src/main/res/mipmap-hdpi/ic_launcher.png new file: Happy/HappyClient/src/main/res/mipmap-mdpi/ic_launcher.png new file: Happy/HappyClient/src/main/res/mipmap-xhdpi/ic_launcher.png new file: Happy/HappyClient/src/main/res/mipmap-xxhdpi/ic_launcher.png new file: Happy/HappyClient/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file: Happy/HappyClient/src/main/res/values-w820dp/dimens.xml new file: Happy/HappyClient/src/main/res/values/colors.xml new file: Happy/HappyClient/src/main/res/values/dimens.xml new file: Happy/HappyClient/src/main/res/values/strings.xml new file: Happy/HappyClient/src/main/res/values/styles.xml new file: Happy/HappyClient/src/test/java/zhangsuixu/happy/com/ExampleUnitTest.java new file: Happy/build.gradle new file: Happy/gradlew new file: Happy/gradlew.bat new file: Happy/settings.gradle
** 2. 输入git add . 即标记所有文件为暂提交状态。
- ** 3. 输入git commit -m ‘文件名’ 即提交所有暂提交文件到暂存区。
- ** 4. 输入git push origin master 即推所有暂存区的文件到服务器上。
然后就可以在coding网站上看到自己提交的代码了
具体常用命令说明待写…