flask_api_project_github_integration
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| flask_api_project_github_integration [2024/08/11 21:58] – created oso | flask_api_project_github_integration [2024/10/17 21:42] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| - Commit those changes to the appropriate branch (e.g., `develop/ | - Commit those changes to the appropriate branch (e.g., `develop/ | ||
| - Push your changes to the GitHub repository. If working on `master`, your files will be updated in the `master` branch. | - Push your changes to the GitHub repository. If working on `master`, your files will be updated in the `master` branch. | ||
| + | |||
| + | ==== Synchronizing Your Local Git Folder with GitHub ==== | ||
| + | |||
| + | === 1. Initialize the Git Repository === | ||
| + | * Open **VS Code** and open your project folder (`C: | ||
| + | * Open the integrated terminal in VS Code ('' | ||
| + | * Navigate to your project directory if not already there: | ||
| + | < | ||
| + | cd C: | ||
| + | </ | ||
| + | * Initialize a new Git repository in your folder: | ||
| + | < | ||
| + | git init | ||
| + | </ | ||
| + | * This command creates a hidden '' | ||
| + | |||
| + | === 2. Stage and Commit Your Files === | ||
| + | * Check the status of your repository to see untracked files: | ||
| + | < | ||
| + | git status | ||
| + | </ | ||
| + | * Stage all your files for commit: | ||
| + | < | ||
| + | git add . | ||
| + | </ | ||
| + | * Commit the files with a message: | ||
| + | < | ||
| + | git commit -m " | ||
| + | </ | ||
| + | |||
| + | === 3. Connect to Your GitHub Repository === | ||
| + | * Go to your GitHub account and create a new repository. You can name it '' | ||
| + | * Do not initialize the repository with a README, '' | ||
| + | * After creating the repository, GitHub will show you the commands to connect your local repo to this remote one. You'll need to add the remote repository URL: | ||
| + | < | ||
| + | git remote add origin https:// | ||
| + | </ | ||
| + | * Verify the remote connection: | ||
| + | < | ||
| + | git remote -v | ||
| + | </ | ||
| + | |||
| + | === 4. Push Your Local Commits to GitHub === | ||
| + | * Now that your local repository is connected to the GitHub repository, push your changes: | ||
| + | < | ||
| + | git push -u origin main | ||
| + | </ | ||
| + | * If your GitHub repository uses a different default branch (like '' | ||
| + | |||
| + | === 5. Verify the Changes on GitHub === | ||
| + | * Go to your GitHub repository page and refresh it. You should see your '' | ||
| + | |||
| + | Now your local project is synchronized with your GitHub repository! From here on, you can make changes to your files, commit them, and push them to GitHub. | ||
| + | |||
| + | ---- | ||
| + | |||
| - **Deploying to the Staging Server:** | - **Deploying to the Staging Server:** | ||
flask_api_project_github_integration.1723413488.txt.gz · Last modified: 2024/10/17 21:42 (external edit)
