Using whatever method you generally follow, ensure your repo is on your local machine.
Here is what cloning my repo ooked like as per here:
If you have already created branches in GitHub, you will need to follow this procedure for downloading all of your branches - it does not automatically bring down the other branches.
At this point when I ran what was here, I got this:
Created a new issue here.
By searching You are in 'detached HEAD' state. You can look around, make experimental
in Google, found this StackOverflow article ... Which lead me to this aticle in the Git web space.
Here's how I fixed it:
You can confirm it was successful by running:
In this project I also had to set up the upstream for main - but ran into issues. See: Issue #14
You'll just need to:
- run
git checkout main
- run
git push -u origin main
Ensure you have python installed. For this project, we are using 3.6.5 versiom.
It is always best practice to complete your projects in their own virtual environment. Therefore, we will follow this doc - specifically:
- the virtualenv section
- the virtualenvwrapper section, which will make things SO awesome (my favorite reason being that when you turn on the virtual machine, it takes you directly in to the folder your project is stored in)
Unfortunately, the following is for Windows only. I'm not sure what it is for Linux/Mac users.
-
Open a command prompt - your keyboard shortcut for this is:
WINDOWS KEY + r
It looks something like this: -
Change into the directory where your repo is. In this example, I ran:
cd "C:\Users\Kat\Documents\Programming\repo\ExpoBoothSchedule"
-
As per this, I then ran:
mkproject ExpoBoothSchedule
I chose to name my project and thus virtual environment after my GitHub repo name.
You are now in your new virtual environment!
NOTE: Step 4 may be unnecessary, butI didn't realize it until after I ran it. I was basing these steps off of old cheat sheets of mine.
- I then ran the following:
setprojectdir setprojectdir "C:\Users\Kat\Documents\Programming\repo\ExpoBoothSchedule"
To turn off the virtual environment, you would run: deactivate
At this point we are ready to begin creatimg bare bones.
Use git to enter into your repo. Then move into a new branch. For this project, I created the following as per here:
`git checkout -b BareBones`
This was supposed to also setup a connection to the upstream but did not appear to do so as shown by running git push
:
Turns out there was a change in authentication on August 13, 2021 - less than 1 month ago!
Logon failed, use ctrl+c to cancel basic credential prompt.
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/ProsperousHeart/ExpoBoothSchedule.git/'
Looks like we needed to:
- Create a personal access token (PAT)
- Remove the Windows credential for GitHub as outlined here
- Using Git Credential Manager Core (local git) supposed to store the creds .... but the Git documentation doesn't explain how to store it AFTER you've already cloned it. So ...
Since we can at least move forward (and there's currently no indication of an issue getting data between local git repo and GitHub, I will simply leave these potential related links:
- Git Credential Manage Core
- About Authentication To GitHub
- Using A Token On Command Line
- Creating A Token
- About Remote Repositories
Once a Personal Access Token was created, used it and my username to be able to authenticate in my CLI.
After that, still had to set upstream so in the BareBones branch, ran: git push -u origin BareBones
Then ensure that the main branch is updated & BareBones is a "fresh" copy by running:
git checkout main
git pull
git checkout BareBones
git merge main BareBones
git push
Be sure that your virtual environment is on and that you have installed your proper modules. If you're not sure, you can run:
pip list