Uploading code from Visual Studio to Github

Hi there,

I’ve started writing an automation framework using Selenium and Visual Studio I thought it would be a good idea to copy the code base up to GitHub so that I can re-use it going forward.

I have to admit I’m a bit of a novice when it comes to GitHub and whilst I’ve had a good scour online I’ve not been able to find something definitive for what I’m after. Has anyone had any experience of having to push code from VS up to GitHub and, if so, could you share the steps you took?

Alternatively, if anyone has any links to posts, videos etc which outline how to do this, as well as general GitHub tutorials, that would be great too :slight_smile:

Look forward to seeing what people come back with!


Hi, I know you mentioned Visual Studio, but is that really Visual Studio or Visual Code? I ask as I struggled with Visual Code and found a good tutorial that described how to do this. For those wishing to do this in Visual Code… https://www.michaelcrump.net/using-github-with-visualstudio-code/. It also (briefly) mentions creating a repository in gitHub to throw the project at.

Biggest early lesson I learnt was .gitignore. I can’t suggest this strongly enough. It’s good to know what you want to control but it’s better to know what you don’t need to upload, especially as I’ve been using Node…

1 Like

Hi Chris, thanks for the response. It’s Visual Studio, I’ve not actually used Visual Studio Code yet

There are a couple of ways - there’s an extension to have Git inside Visual Studio for easier management, but that depends on the version you have how good it is :stuck_out_tongue: https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Visual-Studio

If you’re comfortable with the command line, here’s a good primer: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/

There are other tools you can download that make using Git a bit easier, but I find that knowing the command line helps with those tools as well as they sometimes get mucked up.

I use Visual Studio (and VS Code) and Git for Windows myself, so happy to answer any questions you have!

1 Like

I’m with Hilary on this. If you master the command line then you’re king. Also a good integration with your IDE is essential. Here’s another source to explore: https://visualstudio.github.com/


Thanks again on this one Hilary/Peet…starting to get more familiar with using GitBash and these tutorials help a great deal

1 Like