git 初步使用 -- 提交代码

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网站上看到自己提交的代码了

具体常用命令说明待写…

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值