|

Git ผูกได้ก็แก้ได้ unset-upstream

ไปทำอีท่าไหนไม่รู้ ตอนpush code ขึ้น git แล้วขึ้น Error มาตามด้านล่าง current branch does not match the name of your current branch . เช็คดูดีๆ อ้าว feature branch ไปชี้ที่ master นี้..​ไม่ใช่ละ โอเค…ปัญหานี้แก้ได้ ไม่ยาก แค่เราต้องปลด branch ที่ผูก แล้วผูกด้วย remote branch ที่ถูกต้อง โดยเริ่มทำการปลด upstream branch ก่อนตามคำสั่งนี้ คราวนี้ local branch เราก็จะไม่ผูกกับ remote แล้ว ต่อไปก็ทำการผูกกับ remote ลอง pull & push ก็จะได้ปกติ

How to Delete a Git Branch

ใน git ปกติแล้วเราต้องการลบ branch สามารถใช้คำสั่งด้านล่างได้เลย แต่ถ้าได้ข้อความจากgit บอกว่า the Branch xxxx is not fully merged. เราก็ต้อง -D แทน -d เพื่อเป็นการ force delete error: The branch ‘xxxxxx’ is not fully merged. References: How to Delete a Git Branch Both Locally and Remotely

Git- Checking out a remote branch by command line

เมื่อเพื่อนเราได้ commit และ push ของเขาขึ้นที่ repository เรียบร้อยแล้ว เราจะเรียก branch ที่อยู่ใน server เราเรียกว่า remote branch และเราเมื่อต้องการ checkout remote branch เราจะใช้คำสั่งนี้ เพื่อ update branch จาก repo มาก่อน checkout remote มาที่เครื่องเรา ที่มา https://www.freecodecamp.org/news/git-checkout-remote-branch-tutorial/

|

10 Apps for Java developer in Mac OS

Apps สำหรับ Java developer ที่ตอนนี้ผม install อยู่ในเครื่องที่ใช้งานตอนนี้ sdkman – สำหรับ tool ตัวนี้ช่วยให้ลง jdk ในเครื่องได้หลาย version และการสลับใช้งานไป version นี้หรือไปอีก version สามารถทำได้ง่าย Visual Studio Code – Editor ตัวนี้ใช้งานเหมาะมากรวดเร็ว ใช้งานง่าย ใช้บ่อยๆ สำหรับโปรเจคที่เขียนด้วย Golang, javascript, typescript, groovy IntelliJ IDEA – สำหรับ Java IDE ตัวนี้ใช้งานดีที่สุดแค่ CE version ก็เพียงพอแล้วสำหรับงาน Java micro-service, Java spring boot Sublime + PrettyJSON plugin – text editor…