I'm doing all my steps using the controls in Source Control in VSCode. I've cloned the master branch of a forked repo. I have created a new branch. The next two steps do not automatically reflect online and I don't quite understand why: I have changed the name of my branch (I had to publish it and then manually delete the old branch on my github to only have the new branch, eventhough VSCode was only showing me the renamed branch). I have deleted the master branch, but I'm not sure how to now update github to show that it was deleted. Help pls?
#π Branches in VSCode (git)
24 messages Β· Page 1 of 1 (latest)
@spark schooner
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
can you run git status?
I don't know anything about the source control UI in VSC, so I can only help you in terms of git commands at the terminal.
and I am trying to learn the VSCode UI now π
$ git status
On branch non_local_means_update_#3285
Your branch is up to date with 'origin/non_local_means_update_#3285'.
nothing to commit, working tree clean
on github I see
can you show git branch also?
$ git branch
* non_local_means_update_#3285
git branch -d master
git push --delete
I think this would cause your deletion of master in the local, cloned repo to propogate to the repo on github.
note that github might prevent you from deleting the master branch. this would be in the repo settings on github.
(that's a github feature, not a git feature.)
$ git branch -d master
error: branch 'master' not found.
$ git push --delete
fatal: --delete doesn't make sense without any refs
(also I can't test these commands because I don't have any repos where I want to delete a branch on the remote π )
can you show git remote? you might need to do git push -d origin baster
this is a fork of an open source project, they just recommend deleting master so you don't accidentally work on it, but I suppose if it's gone in my VSCode, then I can't work on it anyway
$ git remote
origin
upstream
yeah, so git push -d origin master
! [remote rejected] master (refusing to delete the current branch: refs/heads/master) I think we hit the github wall π
indeed
yw
!close
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.