1

一直进步 做喜欢的

 1 year ago
source link: https://xfliu1998.github.io/2023/05/20/Git/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

一直进步 做喜欢的

原文链接:

之前学java开发特意学了项目管理工具git,好久不用了乌龟也不能使用了,现在要捡起来记一下笔记。

  1. 在GitHub上创建一个repositories
  2. 找到自己想要提交的代码的文件夹目录,右键git bash here
  3. 依此执行以下命令:
    git init
    git add 想要提交的文件
    git commit -m "提交说明"
    git remote add origin 仓库地址
    git push -u origin master
  4. 输入github账户用户名和密码
  1. 进入要上传的文件路径,git status检查是否在该分支下,若不在,切换分支git checkout 分支名
  2. 依此执行以下命令:
    git add 更新的文件名
    git commit -m "更新说明"
    git pull # 拉取当前分支最新代码
    git push origin master # 上传
  3. 输入github账户用户名和密码
    $ git config --global user.name "你的GitHub登陆名"
    $ git config --global user.email "你的GitHub注册邮箱"

其他git常用命令

公司开发分支为develop,员工个人开发分支为lxf_develop
员工每次开发需要将develop分支merge到自己分支,在此基础上开发
开发后再提交merge develop request

# 切换到主分支develop
git checkout develop
# 检查当前分支
git branch
# 将develop分支代码拉到本地
git pull
# 切换到个人分支
git checkout lxf_develop
# 将develop分支合并到lxf_develop
git merge develop

git clone url # 克隆项目代码

报错:LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
git使用代理出现LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 错误
Mac下xcrun: error: invalid active developer path问题解决方法

Python环境部署

#查看python版本
python(3) --version

# 查看所有的虚拟环境,带有星号*的为当前虚拟环境
conda info -e

# 创建虚拟环境
conda create -n your_venv_name python=x.x
virtualenv your_venv_name

# 进入指定虚拟环境
activate your_venv_name(Windows)
source your_venv_name(Linux)

# 退出当前虚拟环境
deactivate

# 删除虚拟环境
conda remove -n your_venv_name --all

pip安装

# 查看已安装模块
pip list
pip freeze

# 批量安装
pip freeze > requirements.txt
pip install -r requirements.txt

# 普通下载
pip install virtualenv # 安装虚拟环境

第一步将依赖库导入到requirements.txt 文件中,未指定路径就是保存在用户目录下
第二步为批量安装requirements.txt文件中的库

nltk_data下载

>>>from nltk.book import *	# 可以用来查看nltk_data所在路径

# 下载数据集
>>>import nltk
>>>nltk.download()

nltk_data下载github网址:https://github.com/nltk/nltk_data/tree/gh-pages
使用时下载packages文件夹并重命名为nltk_data放在相应路径


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK