วันอังคารที่ 31 สิงหาคม พ.ศ. 2564

วันจันทร์ที่ 23 สิงหาคม พ.ศ. 2564

 git branch --merged master lists branches merged into master

git branch --merged lists branches merged into HEAD (i.e. tip of current branch)

git branch --no-merged lists branches that have not been merged

By default this applies to only the local branches. The -a flag will show both local and remote branches, and the -r flag shows only the remote branches.

วันศุกร์ที่ 20 สิงหาคม พ.ศ. 2564

 git remote -v         check ว่าเชื่อมกับ remote repo ไหน


git branch -d branch_name         ลบ branch


git reflog         show code


git checkout -b branch_name code        กู้ branch

วันพฤหัสบดีที่ 19 สิงหาคม พ.ศ. 2564

 

Quick setup — if you’ve done this kind of thing before

Get started by creating a new file or uploading an existing file. We recommend every repository include a READMELICENSE, and .gitignore.

…or create a new repository on the command line

echo "# testgit4" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Nathat/testgit4.git
git push -u origin main

…or push an existing repository from the command line

git remote add origin https://github.com/Nathat/testgit4.git
git branch -M main
git push -u origin main

…or import code from another repository

You can initialize this repository with code from a Subversion, Mercurial, or TFS project.

Import code

 

…or create a new repository on the command line

echo "# testgit4" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Nathat/testgit4.git
git push -u origin main

วันพฤหัสบดีที่ 5 สิงหาคม พ.ศ. 2564