Remove connection between VSC Project and Github - github

I have created a project in VSC and then decided to upload it to my github. I connected VSC with Git and created a repository through VSC. The upload failed so I deleted the repository on Github, but for some reason the project is still connected to github (The letters A,U,M next to the file names) How do I unlink this connection so that my project is again an offline project?

You need to execute in the Visual Studio console the following command
git remote rm
And then restart vscode, it will be disconnected from the git repository

Related

branches of git repo not showing in vscode using local devcontainer

I have a repo on github configured with codespaces. When opening codespaces on github in the cloud everything works and I can easily switch between branches.
Now I checked out the same repo locally on my windows machine an opened it with my local installed VScode. Again everything normal, and I can easily switch between different branches.
VScode now offers me to reopen in a devcontainer. I choose to do so and VScode starts building my local devcontainer, installing... After a while my devcontainer is ready and I can modify code and build (branch available is the one last used on the windows side). So far so good. However now I can not change branches in VScode anymore. Also when I click on the Git icon on the left of VScode I get a message saying:
The folder currenlty open doesn't have a git repository.
However in the terminal of the devcontainer I see my complete git repo (with all the git files) that is mounted from Windows. Changes done in the container are immediately reflected on Windows and vice versa as well (just checked this to make sure that it is properly mounted).
Any help is very welcomed.
Regards
Marc

Intellij - cannot connect existing project to an existing Github repo

I have an existing Intellij (Ultimate 20,1 beta) project that I want to add to an existing Github repo
Within Intellij I have authenticated my account using the 'Settings/Github' option. I have setup IntelliJ as an authorized app on Github.
When I try to setup the the Github remote I am getting a 'remote: repository not found' error
Any suggestions?
As a postscript, I deleted my rep from Github and then tried using the Intellij Git/Github/Share feature to create the repo from Github.
This process created the new repo but failed with the following message
0:18 Can't finish GitHub sharing process
Successfully created project 'gd-smart' on GitHub, but initial push failed:
remote: Repository not found.
repository 'https://github.com/davoutuk/gd-smart.git/' not found
Got this working eventually via
Within Intellij I unchecked "use credential helper"
Closed Intellij
Deleted the ".git" sub directory
Deleted the 'vcs.xml' file
Made sure that I had a working Github connection under 'Settings/Github'
Then re-opened Intellij and selected the VCS for Git

Github local repo with VS code : Too many changes

I have install Github Enterprise on a self-managed server. I am connecting to my Github repo through VS Code. Every time I open VS code:
1 - It's trying to connect automatically to my cloud repo (Which I would like to be able to manually connect)
2 - VS code is installed in Anaconda and it's detecting 5000 changes....all anaconda files on my local machine
Can anyone help me with this issue?
thank you
I guess you have Anaconda or a conda environment installed into your project folder? Then you have to add that folder to your .gitignore file.
In VSCode you can rightclick on one of the 5000 files, select "Add to .gitignore" from the context menu, then the file .gitignore opens and you can delete everything but the top folder from the new entry and then that folder will be ignored.
Btw., VSCode doesn't update your local git repository automatically but just checks, if there are new changes in your remote repo (github) or how far it is behind your local changes. You can see that in the VSCode status bar. If you want to actually change one of the repos you either have to "pull" or "push" manually.

Unable to integrate Github with Pycharm

I have created a repository on Github. I am using Windows 7 64 bit and Pycharm Community edition. I want to integrate the Github repository with pycharm but I am getting the error
Couldn't get the list of GitHub repositories
Connect to api.github.com:443 [api.github.com/192.30.252.127] failed: connect timed out
Although I am able to clone he same repository from command prompt using git clone command.
I had the same issue.
Configure your proxy if using one:
File->Settings->System Settings->HTTP Proxy
Another thing to try is to clone the project locally then add as new project in Pycharm. Afterwards I was able to do all git operations under VCS->git including add/commit/push for my project.
try to check whether you have given the path to Git executable correctly by testing it using test button next to it...(file>settings>version control>Git>path to Git Executable)
make sure you have given the git client path correctly..
C:\Program Files\Git\cmd\git.exe

Eclipse Egit using remote system to add project with git support

I have a Server with SSH access. On this server I have a php/yii project including a git repository (so versioned with git). Is it possible to use the EGit Team Provider (which just works fine for local projects/ .git folders) for those remote projects?
I just get nullpoint exceptions with the wizard (Share project) and cant get EGit to recognize the existing git project.
Maybe could try this by creating a fresh test .git repo on a linux server, add a php file, use eclipse remote system to browse by ssh for the folder containing the .git folder, use right click on that folder->create remote project and then somehow figure out how EGit could be added...
EGIT doesn't recognize the repository if it doesn't end with .git extension
Login to the LINUX server
cd to path in which you want the repository in
mkdir your_project_name.git //This will create the repository
git init --bare //This will actually initialize the git repository
clone this repository
add files in the local repo
add files to index, commit and push to master