[Android TIL] 240402 (ํŒ€ํ”„๋กœ์ ํŠธ ๊ตฌํ˜„ - UI ๋ฐ ์•กํ‹ฐ๋น„ํ‹ฐ)
๋ฐ˜์‘ํ˜•

 

 

 

 

 

๐ŸŒฑ Today I Learned (์ง‘์ค‘ ์‹œ๊ฐ„: 12์‹œ๊ฐ„ 15๋ถ„)

  1. (09:50 ~ 10:00 / 10๋ถ„) TIL ๋ฐ ํ•˜๋ฃจ ๊ณ„ํš ์ •๋ฆฌ
  2. (10:00 ~ 11:00 / 1์‹œ๊ฐ„) ํŒ€ํ”„๋กœ์ ํŠธ ํšŒ์˜
  3. (11:00 ~ 13:00 / 2์‹œ๊ฐ„) ํŒ€ํ”„๋กœ์ ํŠธ ๋งˆ์ดํŽ˜์ด์ง€ ๊ตฌํ˜„ : UI
  4. (14:50 ~ 17:00 / 2์‹œ๊ฐ„ 10๋ถ„) ํŒ€ ํ”„๋กœ์ ํŠธ ๋งˆ์ดํŽ˜์ด์ง€ ๊ตฌํ˜„ : UI
  5. (17:00 ~ 17:20 / 20๋ถ„) ์–ด์ œ TIL ๋‚ด์šฉ ์ •๋ฆฌ
  6. (19:00 ~ 23:00 / 4์‹œ๊ฐ„) ํŒ€ ํ”„๋กœ์ ํŠธ ๋งˆ์ดํŽ˜์ด์ง€ ๊ตฌํ˜„ ๋ฐ ํšŒ์˜
  7. (01:00 ~ 02:00 / 1์‹œ๊ฐ„) ์˜ค๋Š˜ TIL ๋‚ด์šฉ ์ •๋ฆฌ
  8. (02:00 ~ 03:35 / 1์‹œ๊ฐ„ 35๋ถ„) ํŒ€ ํ”„๋กœ์ ํŠธ ๋งˆ์ดํŽ˜์ด์ง€ ๊ตฌํ˜„ : Activity
  9. ์ง„ํ–‰์ค‘ - ์ •์ฐฝ๊ฒฝ ์„ค๋ช…ํšŒ ๋‚ด์šฉ ์ •๋ฆฌ
  10. ์ง„ํ–‰์ค‘ - 9์‹œ ์ดํ›„ ์Šคํƒ ๋‹ค๋“œ ์‹ฌํ™”๋ฐ˜ ๊ตฌํ˜„

*** ์ ์‹ฌ 13:00 ~ 14:00 / ์ €๋… 18:00 ~ 19:00 ์ œ์™ธ

โ€‹

 

 

1. ํŒ€ํ”„๋กœ์ ํŠธ ๋งˆ์ดํŽ˜์ด์ง€ ๊ตฌํ˜„ : UI

 

 

์˜ค๋Š˜์€ ์ •๋ง ํ•˜๋ฃจ์ข…์ผ ํŒ€ํ”„๋กœ์ ํŠธ์—๋งŒ ๋งค์ง„ํ–ˆ๋‹ค.
ํ˜ผ์ž์„œ git์„ ์‚ฌ์šฉํ•˜๋‹ค๊ฐ€ ํ˜‘์—…์„ ํ•˜๊ฒŒ ๋˜๋ฉด ์ฒ˜์Œ์— ๋งŽ์€ ์˜ค๋ฅ˜๋ฅผ ๊ฒฝํ—˜ํ•˜๊ฒŒ ๋œ๋‹ค๋Š”๋ฐ, ์ •๋ง ๊ทธ ์˜ค๋ฅ˜๋“ค์„ ๊ฒช๊ณ  ์žˆ๋‹ค. ์ƒ์ƒํ•ด๋ณด์ง€ ๋ชปํ–ˆ๋˜ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•ด ๋‚˜๊ฐ€๋Š” ๊ณผ์ •์ด ์žฌ๋ฐŒ๊ธฐ๋„ ํ•˜๋ฉด์„œ, ์ด ๊ธฐํšŒ๋กœ ์ƒˆ๋กœ ์•Œ์•„๊ฐ€๋Š” ๋‚ด์šฉ๋„ ๋งŽ๋‹ค.

๋งˆ์ดํŽ˜์ด์ง€ UI๊ตฌํ˜„์€ ์–ด๋Š ์ •๋„ ์ดˆ์•ˆ์ด ์™„๋ฃŒ๋˜์—ˆ๊ณ , ์•กํ‹ฐ๋น„ํ‹ฐ๋งŒ ์ˆ˜์ •ํ•˜๋ฉด ๋  ๊ฒƒ ๊ฐ™๋‹ค.

 

 

 

๐Ÿ’ก ๊ตฌํ˜„ํ•˜๊ณ ์ž ํ•˜๋Š” ๊ธฐ๋Šฅ (MyActivity.kt)

1. MainActivity์—์„œ ํ”„๋กœํ•„ ์‚ฌ์ง„์„ ๋ˆ„๋ฅด๋ฉด ๋งˆ์ดํŽ˜์ด์ง€๋ฅผ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.
2. MainActivity์—์„œ Edit Profile์„ ๋ˆ„๋ฅด๋ฉด ๋งˆ์ดํŽ˜์ด์ง€๋ฅผ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.
3. ๋งˆ์ดํŽ˜์ด์ง€์—์„œ ์ด๋ฆ„, ๋ฐ”์ด์˜ค ๋“ฑ์˜ ๊ฐ’์„ ์ˆ˜์ •ํ•˜๊ณ  Done์„ ๋ˆ„๋ฅด๋ฉด ๋ฐ์ดํ„ฐ์— ์ˆ˜์ •์ด ๋ฐ˜์˜๋œ๋‹ค.
	- ์‹ฑ๊ธ€ํ†ค ํŒจํ„ด์„ ์œ„ํ•ด MemoryStorage ๊ฐ’์„ ๊ฐ€์ ธ์˜ค๊ณ , ์ˆ˜์ • ์‚ฌํ•ญ์„ ๋ฐ˜์˜์‹œํ‚จ๋‹ค.
4. ๋งˆ์ดํŽ˜์ด์ง€์—์„œ ์ด๋ฆ„, ๋ฐ”์ด์˜ค ๋“ฑ์˜ ๊ฐ’์„ ์ˆ˜์ •ํ•˜๊ณ  Cancel์„ ๋ˆ„๋ฅด๋ฉด ์ด์ „ ์•กํ‹ฐ๋น„ํ‹ฐ๋กœ ๋Œ์•„๊ฐ„๋‹ค.
	- finish()
5. ๋งˆ์ดํŽ˜์ด์ง€์—์„œ Switch to Login Page๋ฅผ ๋ˆ„๋ฅด๋ฉด ๋กœ๊ทธ์ธ ์•กํ‹ฐ๋น„ํ‹ฐ๋กœ ๋Œ์•„๊ฐ„๋‹ค.
6. Change Profile photo๋ฅผ ๋ˆ„๋ฅด๋ฉด ํ”„๋กœํ•„ ์‚ฌ์ง„์ด ๋ณ€๊ฒฝ์ด ๊ฐ€๋Šฅํ•˜๋‹ค. (๋กœ์ปฌ? ํ”„๋กœ์ ํŠธ ๋ฐ์ดํ„ฐ?)
  • ์ „์ฒด์ ์œผ๋กœ ๋‹ค๋ฅธ ํด๋ž˜์Šค๋‚˜ ์•กํ‹ฐ๋น„ํ‹ฐ์— ๊ฐ’์„ ๋„˜๊ฒจ์ฃผ๊ณ , ๋„˜๊ฒจ๋ฐ›๊ณ  ํ•˜๋Š” ๋กœ์ง ๊ตฌํ˜„์ด ๋งŽ๋‹ค.
  • ์ด๋ฒˆ ์ฃผ์ฐจ์— ๋ฐฐ์šฐ์ง€ ์•Š์•˜๋˜ ๋‚ด์šฉ์„ ๊ฝค ์“ฐ๊ฒŒ ๋  ๊ฒƒ ๊ฐ™๊ธด ํ•œ๋ฐ, ๋ฌธ์ œ ํ•ด๊ฒฐ๊ณผ ๊ณ ๋ฏผ ๊ฒฝํ—˜์ด ๋งŽ์€ ๋„์›€์ด ๋  ๊ฒƒ ๊ฐ™๋‹ค.

 

 

 

๐Ÿ”จ ๋กœ์ง ๊ณ ๋ฏผ์ค‘

 

    companion object {
        private const val REQUEST_IMAGE_PICK = 100 // ์ด๋ฏธ์ง€์„ ํƒ ์š”์ฒญ์„ ๊ตฌ๋ถ„ํ•˜๊ธฐ ์œ„ํ•œ ์š”์ฒญ ์ฝ”๋“œ, ์ž„์˜์˜ ์ƒ์ˆ˜
    }
    
    ...
    
    fun changeProfilePhoto(view: View) {
    val changePictureIntent = Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI)
        startActivityForResult(changePictureIntent, REQUEST_IMAGE_PICK)
    }

    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        super.onActivityResult(requestCode, resultCode, data)
        if(requestCode == REQUEST_IMAGE_PICK && resultCode == Activity.RESULT_OK && data != null){
            val selectedImageUri = data.data
            binding.imgProfile.setImageURI(selectedImageUri)
        }
    }
  • ํœด๋Œ€ํฐ ๋กœ์ปฌ ํŒŒ์ผ์œผ๋กœ ์‚ฌ์ง„ ์ •๋ณด๋ฅผ ๋ณ€๊ฒฝํ•˜๋Š” ๋ฐ์— ์žˆ์–ด ๊ณ ๋ฏผ์ด ์ข€ ์žˆ์—ˆ๋‹ค.
  • ์œ„์˜ ๋‚ด์šฉ์€ ๊ณ ๋ฏผํ•œ ํ”์ ์ธ๋ฐ, ์ผ๋‹จ์€ ๊ถŒํ•œ ๋ถ€์—ฌ ํ™•์ธ ๋“ฑ์ด ๊ตฌํ˜„๋˜์–ด ์žˆ์–ด์„œ ์ •์ƒ์ ์œผ๋กœ ์ž‘๋™ํ•˜์ง€ ์•Š๋Š”๋‹ค.
    ์ผ๋ถ€๋Ÿฌ ๊ถŒํ•œ ๋ถ€์—ฌ๊ฐ€ ํ•„์š” ์—†๋Š” INTERNAL_CONTENT_URI์ธ๋ฐ๋„ ์ผ๋‹จ์€ ๊ทธ๋ ‡๋‹ค.

 

private fun changeProfilePhoto(view: View) {
    val profileImages = arrayOf(
        R.drawable.img_profile1,
        R.drawable.img_profile2,
        R.drawable.img_profile3,
        R.drawable.img_profile4,
        R.drawable.img_profile5
    ) // ์„œํด ์ด๋ฏธ์ง€์—, ๊ฐ€๋กœ์„ธ๋กœ ๊ธธ์ด ์„ค์ •ํ•  ๊ฒƒ
    val randomIndex = (0 until profileImages.size).random()
    binding.imgProfile.setImageResource(profileImages[randomIndex])
}
  • ๋”ฐ๋ผ์„œ ์œ„์™€ ๊ฐ™์ด '์ผ๋‹จ์€' ๋žœ๋ค ์ด๋ฏธ์ง€๋กœ ๊ตฌํ˜„ํ–ˆ๋‹ค

 

binding.btnDone.setOnClickListener {
    val newName = binding.etName.text.toString()
    val newBio = binding.etBio.text.toString()
    val newEmail = binding.etEmail.text.toString()
    val newPhoneNumber = binding.etPhone.text.toString()

    editUserInfo(newName, newBio, newEmail, newPhoneNumber)
    Toast.makeText(this, "์ •๋ณด๊ฐ€ ์ˆ˜์ • ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.", Toast.LENGTH_SHORT).show()
}

...

    private fun editUserInfo(newName: String, newBio: String, newEmail: String, newPhoneNumber: String) {
        user?.let {
            user.name = newName
            user.bio = newBio
            user.email = newEmail
            user.phoneNumber = newPhoneNumber
            MemoryStorage.setUser(user)
        }
    }
MemoryStorage.kt

object MemoryStorage {

    private lateinit var user: User

    internal fun getUser(): User = user
    internal fun setUser(user: User) {
        this.user = user
    }

}
User.kt

@Parcelize
data class User(
    val id: String,
    val password: String,
    var name: String,
    var phoneNumber: String?,
    var email: String?,
    var bio: String?,
    var postDatas: List<Post>
): Parcelable
  • Done๋ฒ„ํŠผ์˜ ๋กœ์ง์— ๋Œ€ํ•ด์„œ๋„ ๊ณ ๋ฏผ์„ ์ข€ ํ•˜๊ณ ์žˆ๋‹ค. ๊ตฌ์ƒ์€ ์œ„์™€ ๊ฐ™๋‹ค.
  • ์‹ฑ๊ธ€ํ†ค์œผ๋กœ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•ด MemoryStorage์— User.kt๋ฅผ ์—ฐ๊ฒฐํ•˜๊ณ  setUser์™€ getUser๋ฅผ ๋งŒ๋“ค์–ด ์‚ฌ์šฉํ•œ๋‹ค.
  • id๊ฐ’์€ ์ˆ˜์ •์ด ๋˜์ง€ ์•Š์œผ๋ฏ€๋กœ android:enabled="false" ์ฒ˜๋ฆฌ ํ•ด๋†จ๋‹ค.
  • Parcelable์€ ์ผ๋ฐ˜์ ์œผ๋กœ ๊ฐ์ฒด๋ฅผ ์ธํ…ํŠธ(Intent)๋‚˜ ๋ฒˆ๋“ค(Bundle)์— ๋‹ด์•„ ๋‹ค๋ฅธ ์ปดํฌ๋„ŒํŠธ๋กœ ์ „๋‹ฌํ•  ๋•Œ ์‚ฌ์šฉ๋œ๋‹ค.
    ๊ฐ์ฒด๋ฅผ ์ง๋ ฌํ™”ํ•˜์—ฌ ์ „๋‹ฌํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์†๋„๋ฉด์—์„œ Serializable ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ตฌํ˜„ํ•œ ๊ฐ์ฒด๋ณด๋‹ค ๋น ๋ฅด๊ณ  ํšจ์œจ์ ์ด๋‹ค.

 

 

 

๐Ÿ”จ UI ๊ตฌํ˜„ ์ค‘ TextView์™€ Edittext ์Œ์„ ์–ด๋–ป๊ฒŒ ๊ตฌํ˜„ํ•˜๋Š” ๊ฒŒ ์ข‹์„์ง€?

  • ๋ชฉํ‘œ UI์—์„œ ์—ฌ๋Ÿฌ๊ฐˆ๋ž˜๋กœ ๊ตฌํ˜„ํ•ด๋ณด๋ฉฐ ๊ณ ๋ฏผ์„ ํ–ˆ๋‹ค.
  • 1) ๋ฆฌ๋‹ˆ์–ด ๋ ˆ์ด์•„์›ƒ orientation์„ horizontal ๋กœ ์„ค์ •ํ•˜๊ณ , ์™ผ์ชฝ Textview, ์˜ค๋ฅธ์ชฝ Edittext weight ๊ฐ๊ฐ ๋‚˜๋ˆ„์–ด ๋ถ„๋ฆฌ
    - ์ •๋ณด ์ด๋ฆ„๊ณผ ์ •๋ณด ์ž…๋ ฅ ๊ฐ„์˜ ๋†’์ด ์ฐจ์ด๋ฅผ ์กฐ์ ˆํ•˜๊ธฐ๊ฐ€ ๋„ˆ๋ฌด ํž˜๋“ค๊ณ  ๋น„ํšจ์œจ์ 
  • โ˜… 2) ๊ฐ๊ฐ์˜ ์ด๋ฆ„/์ •๋ณด ํ•œ ์Œ๋งˆ๋‹ค ๋ฆฌ๋‹ˆ์–ด ๋ ˆ์ด์•„์›ƒ์„ ๊ฐœ๋ณ„์ ์œผ๋กœ ๋งŒ๋“ค์–ด ๋ฐฐ์น˜
    - ์ด๊ฒŒ ์ œ์ผ ์ข‹์€ ๋ฐฉ๋ฒ•์ด๋ผ ๋Š๊ปด์„œ ํ•ด๋‹น ๋ฐฉ๋ฒ•์œผ๋กœ ๊ตฌํ˜„ํ–ˆ๋‹ค.
    - ๊ถ๊ธˆ์ฆ :  ์นด์นด์˜คํ†ก์˜ ํ”„์‚ฌ/๋ฉ”์‹œ์ง€/์‹œ๊ฐ„ ๋ ˆ์ด์•„์›ƒ ๋ฐฐ์น˜๊ฐ€ ์ด๋Ÿฐ ์‹์œผ๋กœ ๋ฐฐ์น˜ํ•œ ๊ฒƒ์ผ๊นŒ?
  • 3) ๋”ฐ๋กœ ๋ ˆ์ด์•„์›ƒ ์—†์ด, ์ „์ฒด ContraintLayout ์•ˆ์—์„œ ์ด๋ฆ„/์ •๋ณด ํ•œ์Œ์„ ์ฒด์ธ์œผ๋กœ ์—ฐ๊ฒฐํ•˜์—ฌ ๋ฐฐ์น˜
    - ์ฒด์ธ์„ ์ด์šฉํ•˜๋ฉด ๊ฐ๊ฐ ๋‹ค๋ฅธ ์ด๋ฆ„์˜ ๊ฒฝ์šฐ ๊ณต๋ฐฑ ๊ธธ์ด๊ฐ€ ๊ฐ์ž ๋‹ฌ๋ผ์„œ ํ•ด๊ฒฐ์ด ์• ๋งคํ•˜๊ณ  ๋น„ํšจ์œจ์ 
  • 4) ConstraintLayout์œผ๋กœ ์ฒด์ธ์„ ๊ฑธ์ง€์•Š๊ณ , ์ •๋ง ๊ฐ์ž ๋”ฐ๋กœ margin์œผ๋กœ๋งŒ ๋ฐฐ์น˜
    - ๊ณต๋ฐฑ ์ฐจ์ด ์ฒ˜๋ฆฌ๊ฐ€ ์–ด๋ ค์›€, ๋‹ค์–‘ํ•œ UI์— ๋Œ€์‘๋„ ๋ถˆ๊ฐ€๋Šฅํ•˜๋ฉฐ ๋ง๋„ ์•ˆ ๋จ
  • 5) Contraint ์•ˆ์— Constraint Layout
    - ์ด ๋ฐฉ๋ฒ•๋„ ๊ดœ์ฐฎ์ง€๋งŒ ๊ท€์ฐฎ์•„์„œ 2 ์ฑ„ํƒ

 

๐Ÿ’ก ๋ฆฌ๋‹ˆ์–ด ๋ ˆ์ด์•„์›ƒ์—์„œ weight ์„ค์ • ์‹œ์˜ ์ฃผ์˜ ์‚ฌํ•ญ

  • ๋ฆฌ๋‹ˆ์–ด ๋ ˆ์ด์•„์›ƒ ์•ˆ์—์„œ weight๋ฅผ ์ค„ ๋•Œ๋Š”, width๋“  height๋“  ์ƒํ™ฉ์— ๋งž๊ฒŒ 0dp๋ฅผ ์„ค์ •ํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค.
    (์˜ˆ: ๋ฆฌ๋‹ˆ์–ด ๋ ˆ์ด์•„์›ƒ์˜ orientation์ด horizontal์ด๋ผ๋ฉด width๊ฐ€ 0dp)
  • ์ด๋ ‡๊ฒŒ ์„ค์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค๋ฉด weight ์ ์šฉ์ด ์ž˜ ๋˜์ง€์•Š์•„ ์˜ค๋Š˜์˜ ์‚ฝ์งˆ๊ณผ ๊ฐ™์€ ํ˜„์ƒ์ด ์ผ์–ด๋‚œ๋‹ค.
  • ์ฐธ๊ณ ๋กœ ๋ฆฌ๋‹ˆ์–ด ๋ ˆ์ด์•„์›ƒ์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  constraint layout์—์„œ width๋‚˜ height์— 0dp ๊ฐ’์„ ๋„ฃ์€ ๋‹ค์Œ ํผ์„ผํŠธ ๊ฐ’์„ ์ง€์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•๋„ ์žˆ๋‹ค.
    - layout_constraintHeight_percent (๋†’์ด ๊ธธ์ด๋ฅผ ๋ถ€๋ชจ์— ๋น„๋ก€ํ•ด ์„ค์ •)
    - layout_constraintWidth_percent (๋„ˆ๋น„ ๊ธธ์ด๋ฅผ ๋ถ€๋ชจ์— ๋น„๋ก€ํ•ด ์„ค์ •)

 

 

 

๐Ÿ”จ stash ๊ด€๋ จ

  • ํ˜‘์—… ์ค‘ pull๊ณผ ๊ด€๋ จํ•ด์„œ ์›น์„œํ•‘์„ ํ•ด๋ณด๋ฉด git stash๊ฐ€ ๋นˆ๋ฒˆํ•˜๊ฒŒ ๋‚˜์˜ค๋Š”๋ฐ, ์‚ฌ์‹ค stash๋กœ ์ƒ๊ธฐ๋Š” ๋ฌธ์ œ์ ์— ๋Œ€ํ•ด์„œ๋Š” ํ˜„์—… ๊ฐœ๋ฐœ์ž ๋ถ„๋“ค์ด ์˜คํžˆ๋ ค stash ์‚ฌ์šฉ์„ ์•ˆ ํ•˜์…”์„œ ์ž˜ ๋ชจ๋ฅด์‹œ๋Š” ๊ฒƒ ๊ฐ™์•˜๋‹ค.
  • ์‚ฌ์‹ค ํŠœํ„ฐ๋‹˜๊ป˜ ์—ฌ์ญค๋ณด๋ฉด ํ˜„์—…์—์„  bash๋ณด๋‹จ ์†Œ์ŠคํŠธ๋ฆฌ ๊ฐ™์€ GUI๋ฅผ ์ด์šฉํ•˜์‹œ๋Š” ๋ถ„๋“ค๋„ ๋งŽ์€ ๋“ฏ ํ•˜๋‹ค. (ใ…Žใ…Ž)
  • ๊ธฐ๋Šฅ ๋ธŒ๋žœ์น˜์— ์žˆ๋‹ค๊ฐ€ ๋ฉ”์ธ ๋ธŒ๋žœ์น˜์˜ ๋‚ด์šฉ์„ pull ํ•˜๊ณ  ์‹ถ์„ ๋•Œ stash๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์ž„์‹œ ์ €์žฅํ•˜๊ธฐ๋ณด๋‹ค๋Š”,
    1) ๊ธฐ์กด ๋‚ด์šฉ commit์„ ๋จผ์ € ํ•ด๋†“๊ณ 
    2) ํ•ด๋‹น ์ƒํƒœ์—์„œ ํ•ฉ์น  ๋ธŒ๋žœ์น˜์˜ ๋จธ์ง€๋ฅผ ๋•ก๊ฒจ์˜ค๊ณ 
    3) Conflict ๋ถ€๋ถ„ (๋นจ๊ฐ„์ƒ‰) ๋ณด์ด๋Š” ๊ฑฐ ์•Œ๋งž๊ฒŒ ์ˆ˜์ •ํ•˜๊ณ  ํ•ฉ์น˜๋Š” ๊ฑธ ๋งˆ๋ฌด๋ฆฌํ•˜๋Š” ๊ฒŒ ์ข‹์€ ๋ฐฉ๋ฒ•์ด๋ผ ํ•˜์…จ๋‹ค.

 

 

 

๐Ÿ”จ merge์‹œ ์ปค๋ฐ‹ ์ž๋™ ์ƒ์„ฑ ๊ด€๋ จ

  • ๋‹ค๋ฅธ ๋ธŒ๋žœ์น˜์˜ ๋‚ด์šฉ์„ pull ํ•œ ๋’ค ๋‚ด ๋ธŒ๋žœ์น˜์— mergeํ•  ๋•Œ ์œ„์™€ ๊ฐ™์€ ์ปค๋ฐ‹์ด ์ž๋™์œผ๋กœ ์ƒ์„ฑ๋˜๋Š” ๊ฒƒ์ด ๋ณด๊ธฐ ์‹ซ์—ˆ๋‹ค.
  • ํ•ด๋‹น ๋‚ด์šฉ์„ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์„ ํŠœํ„ฐ๋‹˜๊ป˜ ์—ฌ์ญค๋ดค๋Š”๋ฐ, ์ž๋™์œผ๋กœ ์ปค๋ฐ‹์ด ์ƒ์„ฑ๋˜๋Š” ๊ฒƒ์€ ์–ด์ฉ” ์ˆ˜ ์—†์œผ๋ฉฐ
    ์ด๊ฑธ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” bash๋ฅผ ์ด์šฉํ•ด์„œ '์• ์ดˆ์— ๋””๋ฒจ๋กญ์—์„œ ํ•ฉ์ณ์ง€๊ณ  ๊ฐœ๋ฐœํ–ˆ๋˜ ๊ฒƒ'์ฒ˜๋Ÿผ ๊พธ๋ฉฐ์ฃผ๋Š” ๋ฐฉ๋ฒ•๋ฐ–์— ์—†๋Š”๋ฐ,  ์ด๊ฒŒ ์ข€ ์–ด๋ ค์šด ๋ฐฉ๋ฒ•์ด๋ผ ์ง€๊ธˆ ๋‹จ๊ณ„์—์„œ ์ž˜๋ชป ํ–ˆ๋‹ค๊ฐ€ ๋‹ค ๋‚ ๋ ค๋จน์„ ์ˆ˜ ์žˆ์–ด์„œ ๋น„์ถ”์ฒœํ•œ๋‹ค ํ–ˆ๋‹ค.
  • ํ˜‘์—… ๋‹จ๊ณ„์—์„œ merge๋ฅผ ํ•˜๋ฉด ๋‹น์—ฐํžˆ ๋Œ€๋ถ€๋ถ„ ์ถฉ๋Œ์ฝ”๋“œ๊ฐ€ ์žˆ์„์ˆ˜ ๋ฐ–์— ์—†๊ธฐ ๋•Œ๋ฌธ์— ๋ฐ›์•„๋“ค์ด๋ผ๋Š” ์˜๊ฒฌ...
  • ์ธ๋ฐ ๋‚˜์ค‘์— ๋‹ค์‹œ ํ•œ ๋ฒˆ ์ฐพ์•„๋ณด๊ณ  ์‹ถ๋‹ค. ๊ทธ๋ƒฅ ์ปค๋ฐ‹์„ ํ•ฉ์น˜๋ฉด ์•ˆ ๋˜๋‚˜? ํ•˜๋Š” ์ƒ๊ฐ์ด ๋“ค๊ธด ํ•˜๋Š”๋ฐ ๋ง์ด๋‹ค.

 

+ ์ถ”๊ฐ€์ ์œผ๋กœ PR์ด ์—ด๋ ค ์žˆ์„ ๋•Œ ๊ธฐ์กด ์ปค๋ฐ‹ ์ˆ˜์ •์„ ๋‹ซ์ง€ ์•Š๊ณ  ๋ฐ˜์˜ํ•˜๋ ค๋ฉด git amend๋ฅผ ์จ์•ผ ํ•˜๋Š” ์ค„ ์•Œ์•˜๋Š”๋ฐ, ๊ทธ๋ƒฅ ํ•ฉ์ณ์งˆ ์žฌ๋ฃŒ ๋ธŒ๋žœ์น˜์— commit push ํ•˜๊ณ  ๋‚˜๋ฉด ๋ณ„๋„์˜ ์กฐ์น˜ ์—†์ด ์ž๋™์œผ๋กœ PR์— ๋ฐ˜์˜์ด ๋˜์–ด ์žˆ์—ˆ๋‹ค.

 

๐Ÿ’ญ Retrospect

์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ํ’€ ์‹œ๊ฐ„์ด ์—†์–ด์„œ ์ข€ ์•„์‰ฝ์ง€๋งŒ, ์ฒซ ํŒ€ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๋ฉฐ ๋งŽ์€ ๊ฑธ ๋Š๋ผ๊ณ  ๋ฐฐ์šฐ๋Š” ๊ฒƒ ๊ฐ™๋‹ค.

๊ธธ๊ฒŒ ํšŒ๊ณ ๋ฅผ ์“ฐ๊ณ  ์‹ถ์€ ๋‚ ์ธ๋ฐ... ๋„ˆ๋ฌด ๋ชฐ๋‘ํ–ˆ๋”๋‹ˆ ์กธ๋ ค์„œ ์ผ๋‹จ ์ž์•ผ๊ฒ ๋‹ค.

โ€‹

 

 

 

 

๋ฐ˜์‘ํ˜•
 ๐Ÿ’ฌ C O M M E N T