|
| 1 | +--- |
| 2 | +title: "Puh Code to IDX" |
| 3 | +description: "How to create .git in local reposity and push your files in Project IDX" |
| 4 | +category: "Project IDX" |
| 5 | +--- |
| 6 | + |
| 7 | +## These are the steps you need to follow to upload your project created in Project IDX to a GitHub repository, follow te next steps: |
| 8 | + |
| 9 | +1. Create a new repository on GitHub and make a note of the repository name you choose. |
| 10 | + |
| 11 | +2. If you want to bypass the steps up to Step 5 [Click Here](https://github.com/settings/tokens?type=beta) |
| 12 | + |
| 13 | +3. Go to your profile icon located in the upper right corner and click on the 'Settings' button |
| 14 | + |
| 15 | +4. Scroll down to the bottom of the page and select 'Developer Settings' |
| 16 | + |
| 17 | +5. Click on the 'Personal Access Token' button to expand its options, then choose 'Fine-grained Tokens' |
| 18 | + |
| 19 | +6. In the top right, you'll find a button labeled 'Generate Token' Click on that. |
| 20 | + |
| 21 | +7. "In the Token Name field, enter the name of the repository if you choose en the Step 1. to upload files in |
| 22 | + |
| 23 | +`(OPTIONAL) If you frequently work on the repository, you may adjust the expiration date.` |
| 24 | + |
| 25 | +8. By scrolling down further, you'll reveal three buttons that can be selected: |
| 26 | + |
| 27 | +> `Public Repositories (read-only)` |
| 28 | +
|
| 29 | +> `All repositories` |
| 30 | +
|
| 31 | +> `Only select repositories` |
| 32 | +
|
| 33 | +`From the given options, select the one that aligns with your requirements. If you need access to a particular repository, choose the third option. For broader access to all repositories, opt for the second option.` |
| 34 | + |
| 35 | +9. In the Permissions section, select all checkboxes and change them to Read and Write. If this option doesn't exist, choose Read-Only |
| 36 | + |
| 37 | +10. Scroll to the bottom and click the green 'Generate Token' button. This will redirect you to a new page where you'll receive a token. |
| 38 | + `IMPORTANT: Keep this token confidential as it provides complete access to the option you chose in step 8.` |
| 39 | + |
| 40 | +11.You'll need to copy the Token given to you by GitHub. Next, navigate to Project IDX and perform these commands in the terminal |
| 41 | + |
| 42 | +- Init a GitHub in your files |
| 43 | + |
| 44 | + ```bash |
| 45 | + git init |
| 46 | + ``` |
| 47 | + |
| 48 | +- Add all files to the staging area |
| 49 | + |
| 50 | + ```bash |
| 51 | + git add . |
| 52 | + ``` |
| 53 | + |
| 54 | +- Commit the changes |
| 55 | + |
| 56 | + ```bash |
| 57 | + git commit -m "{name_commit}" |
| 58 | + ``` |
| 59 | + |
| 60 | +- Change to branch main |
| 61 | + |
| 62 | + ```bash |
| 63 | + git branch -M main |
| 64 | + ``` |
| 65 | + |
| 66 | +- Link your local repository to your remote GitHub repository |
| 67 | + |
| 68 | + ```bash |
| 69 | + git remote add origin https://{your_fine_token}@github.com/{user}/{name_repo} |
| 70 | + ``` |
| 71 | + |
| 72 | +- Upload your files to branch main |
| 73 | + |
| 74 | + ```bash |
| 75 | + git push -u origin main |
| 76 | + ``` |
| 77 | + |
| 78 | +> `If you have a error probably you're not linked your account GitHub in your IDX, follow the steps in` [Getting Started](/) |
0 commit comments