Skip to content

Repository Setup

Now, we are going to learn how to setup local and remote repository for our project.

  • First of all, open you github site and create a remote repository.
    Repository Name: Vaccination-Scheduling-Application-Udemy
    Tick on Add readme file and choose Python on gitignore template

  • Now, create a folder in desktop for initializing local repository.
    Folder Name: Vaccination-Scheduling-Application-Udemy

  • After that, open command prompt in that directory.

  • Now, initialize the local github repository.

    git init

  • After that, you need to connect your local repository to remote repository.

    git remote add origin [Repository URL]

  • Open the readme file and make some changes. Add "Made with Django" in the file.

  • Now, using the command prompt, add the changes in the staging area.

    git add README.md

  • Currently our changes are in staging area, so, we need to commit it.

    git commit README.md -m "My First Commit"

  • Now, in case the name of your local branch is master then change it to main. Because, usually, in the github, the branch name is main instead of master.

  • To see the name of your branch, type

    git branch

  • To change the current branch name to main, you need to type,

    git branch -M main

  • Finally, we have made a commit in the local repository, now, its time to push our changes to remote repository.

  • To push your local changes to remote repository, type

    git push origin main

  • Open the repository and verify that you can see your local changes in the remote repository.