git
git init
git clone
git add
git commit
git diff
git status
git log git log -p
git branch
git chekout
git merge
git fetch
git pull
git push
git remote -v
git remote show
git config
mikeli@mikeli-DELL:~$ git config --global user.name 'mikelichina' mikeli@mikeli-DELL:~$ git config --global user.email 'lishuo94@126.com'
mikeli@mikeli-DELL:~$ git config --list user.name=mikelichina user.email=lishuo94@126.com core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.origin.url=https://github.com/oracle/nb-javac.git remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.master.remote=origin branch.master.merge=refs/heads/master
mikeli@mikeli-DELL:~$ git config --list --global user.name=mikelichina user.email=lishuo94@126.com
mikeli@mikeli-DELL:~$ git config --list --local core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.origin.url=https://github.com/oracle/nb-javac.git remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.master.remote=origin branch.master.merge=refs/heads/master
git init
mikeli@mikeli-DELL:~/code/java$ git init hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use in all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch <name> hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m <name> Initialized empty Git repository in /home/mikeli/code/java/.git/
git clone
mikeli@mikeli-DELL:~/code/c/c_program_language$ git clone https://gitee.com/lishuo94/c_program_language.git Cloning into 'c_program_language'... remote: Enumerating objects: 180, done. remote: Counting objects: 100% (180/180), done. remote: Compressing objects: 100% (178/178), done. remote: Total 180 (delta 86), reused 0 (delta 0), pack-reused 0 (from 0) Receiving objects: 100% (180/180), 62.59 KiB | 890.00 KiB/s, done. Resolving deltas: 100% (86/86), done.
git add
mikeli@mikeli-DELL:~/code/java$ git add HelloWorld.java
git commit
mikeli@mikeli-DELL:~/code/java$ git commit HelloWorld.java -m 'add java' [master (root-commit) a5d18eb] add java 1 file changed, 5 insertions(+) create mode 100644 HelloWorld.java
git log
mikeli@mikeli-DELL:~/code/java$ git log
commit a5d18ebd34e0b727d7cda96cd8200aba75f685be (HEAD -> master)
Author: mikelichina <lishuo94@126.com>
Date: Sat Apr 5 17:22:38 2025 +0800
add java
git remote -v
mikeli@mikeli-DELL:~/code/c/c_program_language$ git remote -v origin http://gitee.com/lishuo94/c_program_language.git (fetch) origin http://gitee.com/lishuo94/c_program_language.git (push)
git remote show origin
mikeli@mikeli-DELL:~/code/c/c_program_language$ git remote show origin
warning: redirecting to https://gitee.com/lishuo94/c_program_language.git/
* remote origin
Fetch URL: http://gitee.com/lishuo94/c_program_language.git
Push URL: http://gitee.com/lishuo94/c_program_language.git
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (local out of date)
git fetch
mikeli@mikeli-DELL:~/code/c/c_program_language$ git fetch warning: redirecting to https://gitee.com/lishuo94/c_program_language.git/ remote: Enumerating objects: 40, done. remote: Counting objects: 100% (40/40), done. remote: Compressing objects: 100% (36/36), done. remote: Total 36 (delta 20), reused 0 (delta 0), pack-reused 0 (from 0) Unpacking objects: 100% (36/36), 10.43 KiB | 114.00 KiB/s, done. From http://gitee.com/lishuo94/c_program_language 0b562a2..b786e47 master -> origin/master
git pull
mikeli@mikeli-DELL:~/code/c/c_program_language$ git pull warning: redirecting to https://gitee.com/lishuo94/c_program_language.git/ Updating 0b562a2..b786e47 Fast-forward Charpter1/countWords1-5-4V2.c | 1 + Charpter1/practice1-11.c | 8 ++++++++ Charpter1/practice1-12.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ Charpter1/practice1-13.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Charpter1/practice1-13V2.c | 3 +++ Charpter1/practice1-14.c | 3 +++ Charpter1/practice1-14V2.c | 3 +++ Others/ArraySize.c | 9 +++++++++ Others/PrintAscii.c | 13 +++++++++++++ 9 files changed, 151 insertions(+) create mode 100644 Charpter1/practice1-11.c create mode 100644 Charpter1/practice1-12.c create mode 100644 Charpter1/practice1-13.c create mode 100644 Charpter1/practice1-13V2.c create mode 100644 Charpter1/practice1-14.c create mode 100644 Charpter1/practice1-14V2.c create mode 100644 Others/ArraySize.c create mode 100644 Others/PrintAscii.c
git push
mikeli@mikeli-DELL:~/code/c/cpp$ git push Username for 'https://gitee.com': lishuo94 Password for 'https://lishuo94@gitee.com': Enumerating objects: 4, done. Counting objects: 100% (4/4), done. Delta compression using up to 4 threads Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 317 bytes | 317.00 KiB/s, done. Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 remote: Powered by GITEE.COM [1.1.5] remote: Set trace flag 404c75b5 To https://gitee.com/lishuo94/cpp.git ff17209..d7de6c5 master -> master
浙公网安备 33010602011771号