1. Git中warning: LF will be replaced by CRLF in your filename 问题解决
执行”git add “提示如下内容:
warning: LF will be replaced by CRLF in readme.txt.
The file will have its original line endings in your working directory.
出现这个问题的原因是不同操作系统平台使用的换行符是不同的:
- Linux/Unix采用的换行符为:LF
- Windows采用的换行符为:CRLF
解决办法:
$ git config --global core.autocrlf false # 关闭自动转换
2. Pycharm上传本地代码到Github
在对pycharm和github都有一定基础的情况下,可以在pycharm中直接上传代码到github
1. 配置Pycharm


按照上图配置好github相关内容还不够,还需要配置git,github只是告诉了pycharm你的账号和密码,还需要配置你本地git可执行程序的路径,如下图:

至此配置已经完成。
2. 建立远程仓库并提交代码


建立远程仓库后会弹出一个框让你选择项目文件,一般是直接全部上传,当然你也可以去掉那些不必要上传的文件。之后pycharm右下角出现提示成功提交的小窗口就代表提交成功啦。
3. 在github中查看上传的新仓库
进入github官网,登陆自己的账号,进入相关的Repository,就可以查看自己提交的代码。
3. Pycharm更新本地代码到github
1.

2.

3.
还是点击菜单栏下的VCS,下拉找到Git,点击一下,下拉找到Push按钮,点击一下,就会出现如下页面:如果你第一步Commit的话,这里就有你上传的Commit信息。然后选择你的提交项目,点击下面的Push按钮,等待几分钟,去你的Github仓库看一下,发现出现了。

随后弹出的对话框直接选择需要push的更新,然后点击push就可以了。
持续更新中......
有用帮助点个赞!
网友评论