zoukankan      html  css  js  c++  java
  • 其他技术----idea中配置git

    Git

    从命令行创建一个新的仓库

    1. git init
    2. git add . "."代表的是所有文件
    3. git commit -m "你的提交描述" 提交到本地仓库
    4. git remote add origin 你的仓库地址
    5. git push -u origin master 往主分支提交代码

    IDEA中操作

    1. 如果使用了其他的版本管理,最好将以前的版本管理去除

    2. File->Setting->Version Control->Git

    3. 这里点击test测试一下本地是不是有git

    4. VCS->Git(PS:如果没有这个选项的则可以选择Import into Version Control ->Create Git Repository)->Add(添加版本控制的文件,需要先选中所有根目录)/Remotes(关联远程仓库)/Clone(克隆远程仓库)/pull(拉取远程仓库)/push(提交本地仓库代码到远程仓库)

    5. VCS->Git->Commit Directory 这里必须填写提交内容

    6. VCS->Git->Push(只有push了其他人pull才有数据)

    7. 导入项目VCS->Import into Version Controller -> Import into Subversion 添加git地址就可以了

    IDEA 配置gitignore

    1. 下载插件 .gitignore
    2. 配置相应的gitignore 文件
    3. 进入项目包所在的文件夹
    4. git rm -r –-cached .
    5. git add .
    6. git commit -m "update .gitignore"
  • 相关阅读:
    mfc判断当前程序是否正在运行
    mfc通过信号量保证线程同步
    delete和析构函数
    获取当前运行的exe路径
    mfc移动文件夹
    Cmake实现样例
    安装Node.js以及Hexo
    分类与回归的关系和区别
    從文本到視覺:各領域最前沿的論文集合
    ubuntu 终端$换行
  • 原文地址:https://www.cnblogs.com/bananafish/p/12110859.html
Copyright © 2011-2022 走看看