in oder to learn more about git and github, I created this project.
Init:
echo "# DEMO1" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
VSCODE:
git remote add origin https://github.com/XLYing23333/Demo1.git
Debian Terminal:
git remote add origin [email protected]:XLYing23333/EX1.git
change: add -> set-url
git push -u origin maingit init: initialize a new git repositorygit add <FILE/.>: add files to the indexgit commit -m "commit message": commit changes to the repositorygit remote add origin <repository-url>: add a remote repositorygit status: show the status of the repositorygit branch: list all branchesgit branch -M <branch-name>: create a new branchgit branch <branch-name>: create a new branch- diff: -M: force move/rename a file, -b: create a new branch
git branch -M main: rename the current branch to maingit branch dev: create a new branch named dev
 git branch -m <old-name> <new-name>: rename a branchgit branch -d <branch-name>: delete a branch (-d: delete -D:delete merged branch)git log: show the commit historygit checkout <branch-name>: change the current branchgit merge <branch-name>: merge a branch into the current branch
