๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Today I Learned(TIL)/์ŠคํŒŒ๋ฅดํƒ€ ๋‚ด์ผ๋ฐฐ์›€์บ ํ”„

๋ฏธ๋‹ˆ ํ”„๋กœ์ ํŠธ_Day 2

by carrot0911 2024. 11. 5.

ํ•˜๋ฃจ ์š”์•ฝ

์˜ค๋Š˜์€ ๋ณธ์บ ํ”„ 2์ผ ์ฐจ... ์–ด์ œ ์ง„ํ–‰ํ•˜๋˜ ํ”„๋กœ์ ํŠธ๋ฅผ ๊ณ„์† ์ง„ํ–‰ํ•˜์˜€๋‹ค.
๋‚ด๊ฐ€ ๋‹ด๋‹นํ–ˆ๋˜ ๋ฉค๋ฒ„ ์นด๋“œ, ๋ฐฉ๋ช…๋ก ํŒŒํŠธ๋ฅผ ์˜ค์ „์— ๋‹ค ํ•ด๊ฒฐํ•˜๊ณ  ํŒ€์›๋ถ„๊ณผ ๋ฉ”์ธ ํŽ˜์ด์ง€๋ฅผ ํ•ฉ์ณค๋‹ค!!
ํŒ€์›๋ถ„์ด ์ž‘์„ฑํ•œ ์ฝ”๋“œ์™€ ๋‚ด๊ฐ€ ์ž‘์„ฑํ•œ ์ฝ”๋“œ๋ฅผ ๋ชจ๋‘ ํ•ฉ์นœ ํ›„, ๋‚˜๋Š” ํ˜„์žฌ ์‹œ๊ฐ„๊ณผ ๋ฐฉ๋ช…๋ก์„ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์™€ ์—ฐ๊ฒฐํ•˜๋Š” ๋ถ€๋ถ„์„ ์ถ”๊ฐ€์ ์œผ๋กœ ๋‹ด๋‹นํ•˜๊ธฐ๋กœ ํ–ˆ๋‹ค.

์ ์‹ฌ์„ ๋ง›์žˆ๊ฒŒ ๋จน๊ณ  ๋‚œ ํ›„, ํ˜„์žฌ ์‹œ๊ฐ„์„ ๋‚˜ํƒ€๋‚ด์ฃผ๋Š” Javascript ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๊ณ  ํŽ˜์ด์ง€์— ๋ฌธ์ œ์—†์ด ํ‘œ์‹œ๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค.

<!-- ์‹œ๊ณ„ -->
<div class="clock">
    <h3 id="time"></h3>
</div>
// ์‹œ๊ฐ„ ๋ถˆ๋Ÿฌ์˜ค๋Š” ๊ธฐ๋Šฅ
function updateTime() {
    const timeElement = document.getElementById("time");
    const now = new Date();

    // ์‹œ๊ฐ„์„ ํ˜•์‹์— ๋งž๊ฒŒ ๊ฐ€์ ธ์˜ค๊ธฐ
    const hours = String(now.getHours()).padStart(2, "0"); // ์‹œ
    const minutes = String(now.getMinutes()).padStart(2, "0"); // ๋ถ„
    const seconds = String(now.getSeconds()).padStart(2, "0"); // ์ดˆ

    // ์‹œ๊ฐ„์„ ๋ฌธ์ž์—ด๋กœ ์กฐํ•ฉ
    timeElement.textContent = `${hours}:${minutes}:${seconds}`;
}

// 1์ดˆ๋งˆ๋‹ค ์‹œ๊ฐ„์„ ์—…๋ฐ์ดํŠธ
setInterval(updateTime, 1000);

// ํŽ˜์ด์ง€๊ฐ€ ๋กœ๋“œ๋  ๋•Œ ์ฆ‰์‹œ ์‹œ๊ฐ„์„ ํ‘œ์‹œํ•˜๊ธฐ ์œ„ํ•ด ์ดˆ๊ธฐ ํ˜ธ์ถœ
updateTime();

์œ„์˜ ๋‘ ์ฝ”๋“œ๋ฅผ ํ†ตํ•ด ์‹ค์‹œ๊ฐ„์œผ๋กœ ์‹œ๊ฐ„์ด ํ‘œํ˜„๋˜๋Š” ๊ฒƒ์„ ์„ฑ๊ณตํ–ˆ๋‹ค ๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž 

๋‹ค์Œ์€ ๋ฐฉ๋ช…๋ก์„ ์ž‘์„ฑํ•˜๋ฉด Firestore์— ์ €์žฅ๋˜๊ณ  ๋‹ค์‹œ ๋ถˆ๋Ÿฌ์™€์„œ ๋‚˜ํƒ€๋‚  ์ˆ˜ ์žˆ๋„๋ก ํ•˜๋Š” ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ–ˆ๋‹ค.
์šฐ์„  ํŒ€์žฅ๋‹˜์˜ Firestore Database์™€ ์—ฐ๋™์„ ํ•˜๊ณ  ๋ฐฉ๋ช…๋ก์ด Database์— ์ €์žฅ๋  ์ˆ˜ ์žˆ๋„๋ก ์ž‘์„ฑํ–ˆ๋‹ค.

// ๋ฐฉ๋ช…๋ก ์ €์žฅ ๊ธฐ๋Šฅ
$(document).on("click", "#guestbookbtn", async function () {
    let name = $('#exampleFormControlInput1').val();
    let content = $('#exampleFormControlTextarea1').val();

    if (name && content) {
        let docData = {
            'name': name,
            'content': content
        };
        try {
            await addDoc(collection(db, "guestbook"), docData);
            alert('๋ฐฉ๋ช…๋ก์ด ์ €์žฅ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!');
            window.location.reload();
        } catch (error) {
            console.error("๋ฐฉ๋ช…๋ก ์ €์žฅ ์ค‘ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค: ", error);
        }
    } else {
        alert('์ด๋ฆ„๊ณผ ๋‚ด์šฉ์„ ๋ชจ๋‘ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.');
    }
});

๊ทธ๋‹ค์Œ์€ Database์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์™€์„œ ํŽ˜์ด์ง€์— ๋ณด์—ฌ์ฃผ๋Š” ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ–ˆ๋‹ค.

// ๋ฐฉ๋ช…๋ก ๊ฐ€์ ธ์˜ค๊ธฐ ๋ฐ ์นด๋“œ๋กœ ํ‘œ์‹œ
async function loadGuestbook() {
    try {
        $('#card').empty();  // ๊ธฐ์กด ๋ฐ์ดํ„ฐ๋ฅผ ์ดˆ๊ธฐํ™”ํ•˜์—ฌ ์ค‘๋ณต ๋ฐฉ์ง€
        let docs = await getDocs(collection(db, "guestbook"));
        docs.forEach((doc) => {
            let row = doc.data();
            let id = doc.id;
            let name = row['name'];
            let content = row['content'];

            let temp_html = `
            <div class="guestbookcard" id="guestbook-${id}">
                <div class="card-body">
                    <h3>${name}</h3>
                    <p>${content}</p>
                    <button type="button" class="btn btn-outline-primary edit-btn" data-id="${id}">์ˆ˜์ •</button>
                    <button type="button" class="btn btn-outline-danger delete-btn" data-id="${id}">์‚ญ์ œ</button>
                </div>
            </div>`;

            $('#card').append(temp_html);
        });
    } catch (error) {
        console.error("๋ฐฉ๋ช…๋ก์„ ๊ฐ€์ ธ์˜ค๋Š” ์ค‘ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค: ", error);
    }
}

์ด ๋ถ€๋ถ„๊นŒ์ง€ ์™„์„ฑํ•˜๊ณ  ํŒ€ ๊นƒํ—ˆ๋ธŒ์— git push๋ฅผ ํ•ด์„œ ์˜ฌ๋ ค์•ผ ํ•˜๋Š”๋ฐ ์—ฌ๊ธฐ์„œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค.......
git push๊ฐ€ ๋จนํžˆ์ง€ ์•Š์•˜๋‹ค... ๐Ÿฅฒ๐Ÿฅฒ๐Ÿฅฒ ๋ถ„๋ช… ์ž˜๋˜๋˜ Github๊ฐ€ ๋ง์ฝ์ด ๋˜๋‹ˆ๊นŒ ์‹์€๋•€์ด ๋‚˜๊ธฐ ์‹œ์ž‘ํ–ˆ๋‹ค...

๋‹ค์‹œ ์ •์‹ ์„ ์ฐจ๋ฆฌ๊ณ  ์—๋Ÿฌ ์ฝ”๋“œ๋ฅผ ๋ณต์‚ฌํ•ด์„œ ๊ตฌ๊ธ€๋ง๋„ ํ•˜๊ณ  ChatGPT์—๊ฒŒ๋„ ๋ฌผ์–ด๋ณด๋ฉด์„œ ์ฐจ๊ทผ์ฐจ๊ทผ ํ•œ ๋‹จ๊ณ„์”ฉ ํ•ด๊ฒฐํ•ด ๋‚˜๊ฐ€๊ธฐ ์‹œ์ž‘ํ–ˆ๋‹ค!

To https://github.com/hajoo0322/1week-project.git
 ! [rejected]        main -> main (non-fast-forward)
error: failed to push some refs to 'https://github.com/hajoo0322/1week-project.git' 
hint: Updates were rejected because the tip of your current branch is behind        
hint: its remote counterpart. If you want to integrate the remote changes,
hint: use 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

ํ•ด๊ฒฐํ•˜๋Š” ๊ณผ์ •์—์„œ ๊ฐ€์žฅ ๋งŽ์ด ๋ณธ ์—๋Ÿฌ ์ฝ”๋“œ์ด๋‹ค...........
์ด ์˜ค๋ฅ˜๋Š” ํ˜„์žฌ ๋กœ์ปฌ ๋ธŒ๋žœ์น˜๊ฐ€ ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ์ตœ์‹  ์ƒํƒœ์™€ ์ผ์น˜ํ•˜์ง€ ์•Š์•„์„œ ๋ฐœ์ƒํ•œ๋‹ค.
์ฆ‰, ์›๊ฒฉ ์ €์žฅ์†Œ์— ์žˆ๋Š” ์ปค๋ฐ‹์ด ๋กœ์ปฌ์— ์•„์ง ๋ฐ˜์˜๋˜์ง€ ์•Š์•˜๊ธฐ ๋•Œ๋ฌธ์— git push ๋ช…๋ น์–ด๊ฐ€ ๊ฑฐ๋ถ€๋œ ๊ฒƒ์ด์—ˆ๋‹ค...
์ด๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ๋จผ์ € ๋กœ์ปฌ์— ๊ฐ€์ ธ์™€์•ผ ํ•œ๋‹ค.
๊ทธ๋ž˜์„œ ๋‹ค์Œ ์ฝ”๋“œ๋“ค์„ ์ฐจ๋ก€๋กœ ์ž…๋ ฅํ–ˆ๊ณ  ๋ฌด์‚ฌํžˆ ์—๋Ÿฌ ์ฝ”๋“œ๋ฅผ ๋„˜๊ธธ ์ˆ˜ ์žˆ์—ˆ๋‹ค ๐Ÿ˜ƒ๐Ÿ˜ƒ 

git pull origin main

git add <ํŒŒ์ผ๋ช…>
git commit -m "๋ฉ”์‹œ์ง€ ์ž…๋ ฅ"

git push origin main

 

From https://github.com/hajoo0322/1week-project
 * branch            main       -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
        index.html
Please commit your changes or stash them before you merge.
Aborting
Merge with strategy ort failed.

๋‹ค์Œ์œผ๋กœ ๋งŽ์ด ๋ณธ ์—๋Ÿฌ ์ฝ”๋“œ์ด๋‹ค....
์ด ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๋Š” ๋กœ์ปฌ์—์„œ ์ˆ˜์ •ํ•œ ํŒŒ์ผ์ด ์žˆ์–ด์„œ ๋ณ‘ํ•ฉ์„ ์ง„ํ–‰ํ•  ์ˆ˜ ์—†์„ ๋•Œ ๋ฐœ์ƒํ•œ๋‹ค.
index.html ํŒŒ์ผ์— ๋กœ์ปฌ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์ด ์กด์žฌํ•˜๊ธฐ ๋•Œ๋ฌธ์—, ๋ณ‘ํ•ฉ์„ ์ง„ํ–‰ํ•˜๊ธฐ ์ „์— ์ด๋ฅผ ์ •๋ฆฌํ•ด์•ผ ํ•œ๋‹ค.
๋‹ค์Œ ์ฝ”๋“œ๋“ค์„ ์ด์šฉํ•ด์„œ ์—๋Ÿฌ๋ฅผ ๋ฌด์‚ฌํžˆ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค ๐Ÿค”๐Ÿค” 

git add index.html
git commit -m "๋ฉ”์‹œ์ง€ ์ž‘์„ฑ"

git pull origin main

์„ค๋ช…ํ•˜์ž๋ฉด git add์™€ git commit์„ ํ†ตํ•ด ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ปค๋ฐ‹ํ•œ ํ›„ ๋ณ‘ํ•ฉ์„ ์ง„ํ–‰ํ•˜๋Š” ๊ฒƒ์ด๋‹ค!

์ด๋ ‡๊ฒŒ ๊ตฌ๊ธ€๋ง๊ณผ ChatGPT ๋•๋ถ„์— ๋ฌด์‚ฌํžˆ ์—๋Ÿฌ๋ฅผ ๋„˜๊ธธ ์ˆ˜ ์žˆ์—ˆ๋‹ค... ๐Ÿคจ๐Ÿคจ 
์—๋Ÿฌ๋ฅผ ๋„˜๊ธฐ๊ณ  Github main์— git push๋ฅผ ํ•˜๊ณ  ๋‚˜์„œ ํŒ€์›๋“ค๋ผ๋ฆฌ ๋‹ค์‹œ ํ”„๋กœ์ ํŠธ์— ๋Œ€ํ•ด ์ƒ์˜ํ•˜๋Š” ์‹œ๊ฐ„์„ ๊ฐ€์กŒ๋‹ค!

๋ณธ ์บ ํ”„๋Š” ๋ฐฑ์—”๋“œ ํŠธ๋ž™์ด์–ด์„œ ๋งค๋‹ˆ์ €๋‹˜๊ป˜์„œ ํ”„๋ก ํŠธ์— ๋„ˆ๋ฌด ์ง‘์ค‘ํ•˜์ง€ ์•Š์•„๋„ ๋œ๋‹ค๊ณ  ํ•˜์‹  ๋ง์”€์„ ๋“ฃ๊ณ , ๋ชจ๋‘ ๋ชจ์—ฌ์„œ Firebase์™€ ์—ฐ๋™์„ ํ•ด์„œ ์šฐ๋ฆฌ๊ฐ€ ๊ตฌํ˜„์„ ํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ์ด ๋ญ๊ฐ€ ์žˆ์„๊นŒ..... ํšŒ์˜๋ฅผ ์ง„ํ–‰ํ–ˆ๋‹ค.
ํšŒ์˜๋ฅผ ์ง„ํ–‰ํ•œ ๊ฒฐ๊ณผ, ํšŒ์›๊ฐ€์ž… ๊ธฐ๋Šฅ, ๋กœ๊ทธ์ธ ๊ธฐ๋Šฅ, ๋ฐฉ๋ช…๋ก ์ถ”๊ฐ€ · ์ˆ˜์ • · ์‚ญ์ œ ๊ธฐ๋Šฅ, ํšŒ์›๊ฐ€์ž… ์‹œ ์ž…๋ ฅ๋˜๋Š” ์•”ํ˜ธ๋ฅผ ํ•ด์‹œ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ํ†ตํ•œ ๋ณด์•ˆ ๊ฐ•ํ™” ๋“ฑ์˜ ์˜๊ฒฌ์ด ๊ฒฐ์ •๋˜์—ˆ๋‹ค.

๋‚˜๋Š” ๊ทธ ์ค‘์—์„œ ํšŒ์›๊ฐ€์ž…, ๋กœ๊ทธ์ธ ๊ธฐ๋Šฅ์„ ๋‹ด๋‹นํ•˜๊ธฐ๋กœ ํ–ˆ๋‹ค.
์šฐ์„  Firebase๋ฅผ ํ†ตํ•ด ํšŒ์›๊ฐ€์ž…, ๋กœ๊ทธ์ธ ๊ธฐ๋Šฅ์„ ์–ด๋–ป๊ฒŒ ํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ์ž˜ ๋ชฐ๋ž๊ธฐ์— ๊ตฌ๊ธ€๋ง์„ ํ•˜์˜€๊ณ  ์ˆ˜๋งŽ์€ ์ž๋ฃŒ ์ค‘์—์„œ ์œ ํŠœ๋ธŒ ์กฐ์ฝ”๋”ฉ ์ฑ„๋„์˜ Firebase๋ฅผ ํ†ตํ•œ ํšŒ์›๊ฐ€์ž…, ๋กœ๊ทธ์ธ ๊ธฐ๋Šฅ ์ถ”๊ฐ€ ์˜์ƒ์ด ๋ˆˆ์— ๋„์—ˆ๋‹ค.

โœ”๏ธ ์ฐธ๊ณ 

์œ ํŠœ๋ธŒ ์ฃผ์†Œ - ์กฐ์ฝ”๋”ฉ ( ๋กœ๊ทธ์ธ ๊ธฐ๋Šฅ ๊ตฌํ˜„ํ•˜๊ธฐ ์™•๊ธฐ์ดˆ (ft. ํŒŒ์ด์–ด๋ฒ ์ด์Šค) )
https://www.youtube.com/watch?v=tPqTE14DEUg


๋‚œ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•ด์„œ ๋ฐ”๋กœ ์œ ํŠœ๋ธŒ๋กœ ๋‹ฌ๋ ค๊ฐ€์„œ ์˜์ƒ์„ ์‹œ์ฒญํ–ˆ๊ณ , ์•Œ๋ ค์ฃผ๋Š” ์ฝ”๋“œ๋“ค์„ ๊ณต๋ถ€ํ•˜๋ฉด์„œ ์‹ค์‹œ๊ฐ„์œผ๋กœ ํšŒ์›๊ฐ€์ž…, ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€๋ฅผ ๋งŒ๋“ค๊ณ  ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ–ˆ๋‹ค.

ํšŒ์›๊ฐ€์ž… ํŽ˜์ด์ง€


๋กœ๊ทธ์ธ ํŽ˜์ด์ง€

 
์œ„์™€ ๊ฐ™์ด ๊น”๋”ํ•˜๊ฒŒ ์ •๋ฆฌ๋œ ํŽ˜์ด์ง€๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ์—ˆ๊ณ  ์•ˆ์— ํšŒ์›๊ฐ€์ž… ๊ธฐ๋Šฅ๊ณผ ๋กœ๊ทธ์ธ ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ–ˆ๋‹ค.

// ํšŒ์›๊ฐ€์ž… ๊ธฐ๋Šฅ
import { getAuth, createUserWithEmailAndPassword } from "https://www.gstatic.com/firebasejs/9.22.0/firebase-auth.js";

document.getElementById('signUpButton').addEventListener('click', (event) => {  // ํด๋ฆญํ–ˆ์„ ๋•Œ ํ•จ์ˆ˜ ์‹คํ–‰
    event.preventDefault();

    const email = document.getElementById('signUpEmail').value;
    const password = document.getElementById('signUpPassword').value;

    const auth = getAuth();  // auth๋ผ๋Š” ๋ณ€์ˆ˜๋ฅผ ๋งŒ๋“ค์–ด์„œ getAuth() ํ•จ์ˆ˜ ์‹คํ–‰
    createUserWithEmailAndPassword(auth, email, password)  // User๋ฅผ ๋งŒ๋“ค์–ด์ฃผ๊ฒ ๋‹ค๋Š” ํ•จ์ˆ˜
        .then((userCredential) => {
            console.log(userCredential);
            // ํšŒ์›๊ฐ€์ž… ์„ฑ๊ณต ์‹œ
            alert('ํšŒ์›๊ฐ€์ž…๋˜์…จ์Šต๋‹ˆ๋‹ค!');
            window.location.href = "login.html"; // login.html๋กœ ์ด๋™
        })
        .catch((error) => {
            console.log('error');
            const errorCode = error.code;
            const errorMessage = error.message;
            alert(`ํšŒ์›๊ฐ€์ž…์— ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค: ${errorMessage}`); // ์—๋Ÿฌ ๋ฉ”์‹œ์ง€ ํ‘œ์‹œ
        });
});
// ๋กœ๊ทธ์ธ ๊ธฐ๋Šฅ
import { getAuth, createUserWithEmailAndPassword, signInWithEmailAndPassword } from "https://www.gstatic.com/firebasejs/9.22.0/firebase-auth.js";

const auth = getAuth();  // auth๋ผ๋Š” ๋ณ€์ˆ˜๋ฅผ ๋งŒ๋“ค์–ด์„œ getAuth() ํ•จ์ˆ˜ ์‹คํ–‰

// ํด๋ฆญํ–ˆ์„ ๋•Œ ํ•จ์ˆ˜ ์‹คํ–‰
document.getElementById('signInButton').addEventListener('click', (event) => {
    event.preventDefault()

    const signInEmail = document.getElementById('signInEmail').value;
    const signInPassword = document.getElementById('signInPassword').value;


    signInWithEmailAndPassword(auth, signInEmail, signInPassword)
        .then((userCredential) => {
            // Signed in
            console.log(userCredential)
            const user = userCredential.user;
            // ...
        })
        .catch((error) => {
            console.log('๋กœ๊ทธ์ธ ์‹คํŒจ!')
            const errorCode = error.code;
            const errorMessage = error.message;
        });
})

์˜์ƒ์„ ๋”ฐ๋ผํ•˜๋ฉด์„œ ๋งŒ๋“ค์–ด์„œ ๊ทธ๋Ÿฐ์ง€ ๋”ฐ๋กœ ์˜ค๋ฅ˜๋Š” ๋ฐœ์ƒํ•˜์ง€ ์•Š์•˜๊ณ  ๋ฌด์‚ฌํžˆ ํšŒ์›๊ฐ€์ž… ํŽ˜์ด์ง€, ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€๋ฅผ ์™„์„ฑํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค.
๊ทธ ํ›„ ํŒ€ Github์— git push ํ•˜์—ฌ ๋ชจ๋“  ํŒ€์›๋“ค์ด ๋ณผ ์ˆ˜ ์žˆ๋„๋ก ํ•˜์˜€๋‹ค!

 

 

ํ”„๋กœ์ ํŠธํ•˜๋ฉด์„œ ๋Š๋‚€ ์  ๐Ÿคจ

ํ”„๋ก ํŠธ์—”๋“œ ๋ถ€๋ถ„์—์„œ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•ด์„œ ํŽ˜์ด์ง€๋ฅผ ์™„์„ฑํ•˜๋Š” ๋ถ€๋ถ„๋„ ๋‚ด๊ฐ€ ์ƒ๊ฐํ–ˆ๋˜ ๊ฒƒ๋ณด๋‹ค ๋” ์–ด๋ ค์› ๊ณ  ๋ณต์žกํ–ˆ๋‹ค... ๋˜ํ•œ ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ๋“ค์„ ์ถ”๊ฐ€ํ•˜๊ธฐ ์œ„ํ•ด ๊ตฌ๊ธ€๋ง, ChatGPT ๋“ฑ์„ ์ด์šฉํ•ด์„œ ๊ณต๋ถ€ํ•˜๋Š” ๊ฒƒ๋„ ํฅ๋ฏธ๋กœ์› ๊ณ , ์‹ค์ œ๋กœ ํŽ˜์ด์ง€์— ์ž˜ ์ ์šฉ๋˜๋Š” ๊ฒƒ๋„ ์‹ ๊ธฐํ–ˆ๋‹ค. ๐Ÿ˜ฎ๐Ÿ˜ฎ

๋˜ํ•œ ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๋ฉด์„œ ์ƒˆ๋กœ ์•Œ๊ฒŒ ๋œ ๋‚ด์šฉ๋“ค์ด ์—„์ฒญ๋‚˜๊ฒŒ ๋งŽ์•˜๋‹ค.... 
๋‚œ ์ „ํ˜€ ๋ชจ๋ฅด๊ณ  ์žˆ์—ˆ๋˜ Github์˜ branch ๊ฐœ๋…๋“ค๊ณผ Pull Request ๋“ฑ๋“ฑ ํ˜‘์—…ํ•  ๋•Œ ํ•„์š”ํ•œ ๋‚ด์šฉ๋“ค์ด ํ”„๋กœ์ ํŠธํ•˜๋ฉด์„œ ์ฒ˜์Œ ๋“ฃ๊ณ  ๊ณต๋ถ€ํ•˜๊ฒŒ ๋˜์—ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  Github์— git commit ํ•  ๋•Œ ๊นƒ ๋ฉ”์‹œ์ง€์™€ ๊นƒ๋ชจ์ง€๋ฅผ ์ด์šฉํ•ด์„œ ์ •ํ•ด์ง„ ๊ทœ์น™์œผ๋กœ ์ž‘์„ฑํ•˜๋ฉด ๋ˆˆ์— ๋” ๊น”๋”ํ•˜๊ณ  ์ž˜ ๋“ค์–ด์˜จ๋‹ค๋Š” ๊ฒƒ์„ ๋งค๋‹ˆ์ €๋‹˜์„ ํ†ตํ•ด ๋“ฃ๊ณ  ํ”„๋กœ์ ํŠธํ•˜๋Š” ๋™์•ˆ ์ต์ˆ™ํ•ด์ง€๊ธฐ ์œ„ํ•ด ๊ณ„์† ์‚ฌ์šฉํ•ด์„œ ์ต์ˆ™ํ•ด์ ธ์•ผ๊ฒ ๋‹ค๊ณ  ์ƒ๊ฐํ–ˆ๋‹ค.

โœ”๏ธ ์ฐธ๊ณ 

๊นƒ ๋ฉ”์‹œ์ง€ ์ฐธ๊ณ 
https://jane-aeiou.tistory.com/93

๊นƒ๋ชจ์ง€ ์ฐธ๊ณ 
https://inpa.tistory.com/entry/GIT-%E2%9A%A1%EF%B8%8F-Gitmoji-%EC%82%AC%EC%9A%A9%EB%B2%95-Gitmoji-cli


 
์•„์ง ํ”„๋กœ์ ํŠธ๊ฐ€ ์ง„ํ–‰ ์ค‘์ด๊ณ , ํ•  ๊ฒƒ๋„ ๋งŽ์ด ๋‚จ์•˜๊ธฐ ๋•Œ๋ฌธ์— ์ฒด๋ ฅ๊ณผ ์ปจ๋””์…˜ ๊ด€๋ฆฌ๋ฅผ ์ž˜ํ•˜๋ฉด์„œ ์ด๋ฒˆ ์ฃผ์— ํ”„๋กœ์ ํŠธ๋ฅผ ์ž˜ ๋งˆ๋ฌด๋ฆฌํ–ˆ์œผ๋ฉด ์ข‹๊ฒ ๋‹ค. ์ง€๊ธˆ๊นŒ์ง€ ๋ฌธ์ œ์—†์ด ์ž˜ ์ง„ํ–‰๋˜๊ณ  ์žˆ์–ด์„œ ๊ธฐ๋ถ„์ด ์ข‹๋‹ค ๐Ÿ˜ƒ๐Ÿ˜ƒ๐Ÿ˜ƒ