> For the complete documentation index, see [llms.txt](https://weerasak-chongnguluam.gitbook.io/sedoc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://weerasak-chongnguluam.gitbook.io/sedoc/git/undefined.md).

# คำสั่งทั่วไป

### fetch remote repo ว่ามีอะไรเปลี่ยนไปบ้าง

```
> git fetch --all --prune
```

ตรง --all กับ คือ sync กับทุก remote repo ส่วน --prune ลบ branch ในเครื่องที่ไม่มีใน remote repo ออกไปด้วย

### reset ให้เท่ากับ head ของ remote branch ล่าสุด

```
# ถ้าไม่ใช่ branch master ก็เปลี่ยนเป็นชื่อ branch ที่ต้องการได้เลย
> git reset --hard origin/master 
```
