git提交步骤

git提交步骤
  1. 先点击team–>pull,将git仓库中更新的数据拉到本地
  2. 然后点击team–>commit,将自己修改过的文件提交
  3. 最后team–>synchronize…,点击图标push,将修改的文件推送到远程git仓库,即可提交
git提交问题及解决方案
  1. 问题一:冲突问题 Checkout conflict with files
    git提交步骤
    解决方法:
    点击team–>commit–>进入Git Staging,将Unstaged Changed中的文件右击Replace with HEAD Revision,直接将本地版本恢复成服务器的。

  2. 问题二:pull拉取失败,报错–>Failed Paths DIRTY_INDEX .classpath
    git提交步骤
    解决方法:
    step1. 点击team–>commit–>进入Git Staging,然后将staged Changed中不认识的文件一律右击remove from index。
    (这里应该只放真正需要提交的,不确定的,双击比较,如果只改了空格或者没有有效改动的也要remove from index。)
    git提交步骤
    step2:将Unstaged Changed中的文件右击Replace with HEAD Revision,直接将本地版本恢复成服务器的。
    git提交步骤

  3. 问题三:pull拉取时,报错–>Failed Paths DIRTY_WORKTREE src/main/resources/conf/git.properties
    git提交步骤
    解决方法:
    step1. 打开该项目的pom.xml文件,找到573行"src/main/resources/engine/conf/git.properties",将这行注释
    (注释这句话的作用是本地不要写git.properties)
    (最近这种方法不管用了,可以用后面的方法,在项目文件夹下解决冲突。)
    step2. 将Unstaged Changed中的文件右击Replace with HEAD Revision,直接将本地版本恢复成服务器的
    git提交步骤

  4. 如果在eclipse里replace with HEAD Revision不能解决问题,可以尝试在项目文件夹下解决冲突
    git提交步骤

  5. git reset – hard,然后提交覆盖掉reset的。