์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- branch ํ์ธ
- ๋งํฌ๋ค์ด
- branch ์์ฑ
- markdown
- ๋ธ๋์น ์์ฑ
- ์ฝ๋๋ธ๋ก
- ![rejected]
- branch ์ญ์
- Git๋ช ๋ น์ด
- ๋ธ๋์น ํ์ธ
- ์ฝ๋๋ธ๋ญ
- ๋ธ๋์น ์ญ์
- Today
- Total
DevLog
.envํ์ผ์ .gitignore์ ์์ฑํ์ง ์๊ณ ๊นํ๋ธ์ pushํ์ ๋ ๋์ฒ๋ฒ ๋ณธ๋ฌธ
.envํ์ผ์ .gitignore์ ์์ฑํ์ง ์๊ณ ๊นํ๋ธ์ pushํ์ ๋ ๋์ฒ๋ฒ
Seungjae Lee 2022. 3. 8. 22:181. gitignore ํ์ผ ์์ .env ํ์ผ ๋ชฉ๋ก๋ค์ ์์ฑํ๋ค.
2. git ์บ์๋ฅผ ์ญ์ ๋ช ๋ น์ด๋ฅผ ์ฌ์ฉํด์ ํด์ tracking ๋๊ณ ์๋ ํ์ผ๋ค์ ํด์ ํ๋ค.
git rm --cached filename
3. ๋ค์ ํ์ผ๋ค์ add, commit ํ์ฌ push ํด์ค๋ค.
git add .
git commit -m ".gitignore is now working"
git push origin main
4. ๊นํ๋ธ ์ ์ฅ์๋ฅผ ํ์ธํด๋ณด๋ฉด .envํ์ผ๋ค์ด ์ญ์ ๋ ๊ฒ์ ํ์ธํ ์ ์๋ค.
<์ฐธ๊ณ ๋ ํผ๋ฐ์ค>
https://stackoverflow.com/questions/30696930/how-to-hide-env-file-from-github
How to hide .env file from Github
I'm using dotenv for my rails project to store API keys. I have the dotenv gem in my gemfile, created a .env in the root of my app and have my API keys listed in there. However, when I push up to g...
stackoverflow.com
Ignore files that have already been committed to a Git repository
I have an already initialized Git repository that I added a .gitignore file to. How can I refresh the file index so the files I want ignored get ignored?
stackoverflow.com