在本地新建分支并推送到远程

git clone xxx.git / or git pull
git checkout -b new_branch_name
add new files
git add .
git commit -m 's'
git

查看所有分支

git

1.查看提交记录

git

2.回退到上一次提交

git reset HEAD^
#HEAD代表当前提交,HEAD^代表上一次提交

3.将本地仓库提交到远端已有仓库

git add .
git commit -m 'first commit'
git remote add github https://github.com/xxxxxxxx.git
git branch -M main
git push -u github main
# git push -u github main --force
# this stands for force push whether the remote has codes or not.

4.查看Git的所有配置

git