User Tools

Site Tools


flask_api_project_github_integration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
flask_api_project_github_integration [2024/08/11 21:58] – created osoflask_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/staging` or `release`).     - Commit those changes to the appropriate branch (e.g., `develop/staging` or `release`).
     - 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:\Users\unapa\OneDrive\Documentos\git`).
 +  * Open the integrated terminal in VS Code (''Ctrl + ` '').
 +  * Navigate to your project directory if not already there:
 +    <code>
 +    cd C:\Users\unapa\OneDrive\Documentos\git
 +    </code>
 +  * Initialize a new Git repository in your folder:
 +    <code>
 +    git init
 +    </code>
 +  * This command creates a hidden ''.git'' folder in your project directory, marking it as a Git repository.
 +
 +=== 2. Stage and Commit Your Files ===
 +  * Check the status of your repository to see untracked files:
 +    <code>
 +    git status
 +    </code>
 +  * Stage all your files for commit:
 +    <code>
 +    git add .
 +    </code>
 +  * Commit the files with a message:
 +    <code>
 +    git commit -m "Initial commit"
 +    </code>
 +
 +=== 3. Connect to Your GitHub Repository ===
 +  * Go to your GitHub account and create a new repository. You can name it ''git'' to match your local folder.
 +  * Do not initialize the repository with a README, ''.gitignore'', or license since you've already set up your local repository.
 +  * 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:
 +    <code>
 +    git remote add origin https://github.com/fipharraguerre/git.git
 +    </code>
 +  * Verify the remote connection:
 +    <code>
 +    git remote -v
 +    </code>
 +
 +=== 4. Push Your Local Commits to GitHub ===
 +  * Now that your local repository is connected to the GitHub repository, push your changes:
 +    <code>
 +    git push -u origin main
 +    </code>
 +    * If your GitHub repository uses a different default branch (like ''master''), replace ''main'' with the correct branch name.
 +
 +=== 5. Verify the Changes on GitHub ===
 +  * Go to your GitHub repository page and refresh it. You should see your ''.py'' and ''.html'' files listed there.
 +
 +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)