a hassle free guide to start with Github - working on VSCode

Einfach Dinge, die nichts mit XAMPP, Apache Friends, Apache, MySQL, PHP und alle dem zu tun haben. Allerlei halt. ;)

a hassle free guide to start with Github - working on VSCode

Postby unleash_it » 26. January 2021 17:05

a hassle free guide to start with Github - working on VSCode

ever wondered how to work with github - well in earlier times i used ATOM which has a pretty awesome github-integration. _It was a pleasure to work with this.

But in these days, probably you user other tools - and perhaps you use VSCode: here we provide some easy to use guides: git - the simple guide for getting started with git while running VSCode:
if your favorite editor is VSCode /(vscodium) and you ever wondered how to do a basic Visual Studio Code GitHub setup then youre right

- how to run the typical Git actions like clone, stage, commit, and push - when using VSCode?
- i once used ATOM which has a pretty nices Github-integration - in fact it was famous for this integration. I loved it

but you can do all these GITHUB-things - if you are inside the Visual Studio Code-Editor. Thats awesome: What do you have to do - for being able to reach this goal:

in the following we offer some short and quick steps to get github-ready while working with VSCode (VScodium):

prerequesite: first of all: if you decide to want to work with Github then in the very first step you have to install Git! this is pretty important.

- in the following we offer some commands, that can be runned in the CLI terminal of VS-CODE.
- step zero: create a local git repository; you can do this within VSCode - just browse and have a look at thelocal project directory
- step one: run the following comand in the CLI terminal of VS-CODE:

Code: Select all
 git init


step two: if you have entered the above code then you can go to the 'Source Control' icon: have a closer look at the left navbar in VS-Code.
If you have some files - that reside there: then you are able to see files ready to be committed to github...

now youre ready to do a commit: just go to

step three: press commit and have a closer look whats happening now.

btw: you can do this on the graphical interface of VSCode(vscodium)

if you are a friend of the CLI - you also can do this commit via the CLI /(this was the way i used to do commits on ATOM {the beloved Editor of the past ])

if you hit the 'Commit' button, you also can send a comments, besides this you stage the changes and finally youre able to commit the files to the Github-server.

as mentioned above: youre free to do this alternatively via running commands from the CLI in VSCode (VSCodium)

Code: Select all
git commit -m "Your comment"


step four: head over to the GitHub-account (i hope you have setup one allready) and then youre able to go ahead and create a new repository.

if you managed to create a new GitHub repository, you can go a step futher.

step five: you have copied the link to the github-repo - with this copy you enter the terminal in VS-CODE and type these commands in succession:

git remote add origin <yeahhh - just enter here the Link to GitHub Repo> //man youre lucky: this command maps the remote repo link to local git repo

Code: Select all
git remote -v                                  // wooooh - this is very exciting: this is to verify the link to the remote repo


and subsequently the following:

Code: Select all
git push -u origin master                      // aaahhh:  this step helps to push the committed changes into the remote repo



summary for the fast reader: follow these steps:

1. install git on vscode

2. ceate a github-repository (copy the link)

3. go with the link data to the Vscode and create project folder with vscode

4. Now that you have managed all the steps youre ready to go the visual way: by clicking on the source conrol menu on the sidebar enter image

5. with the vis-tools you can lick on publish in order to publish your stuff to github

By the way: If it is the very very first time the local git account is trying to connect to GitHub,
Probably the system asks you to enter credentials to GitHub in a separate window.

see some great guides: here:

https://rogerdudler.github.io/git-guide/
https://code.visualstudio.com/docs/editor/github


enjoy
Interessen: Bikes & steel frames: Linux & SBC https://www.allaboutcircuits.com :: die neuen Knowledge-Base: AFFiNE: There can be more than Notion and Miro. auf affine.pro :: WordPress Entwicklung - sic: make.wordpress.org/core/
User avatar
unleash_it
 
Posts: 790
Joined: 10. December 2011 18:32
Operating System: linux opensuse 12.1

Return to Allerlei

Who is online

Users browsing this forum: No registered users and 58 guests