A
A
Alexander Kanaev2020-09-30 16:37:57
git
Alexander Kanaev, 2020-09-30 16:37:57

What is the correct way to push files to GitHub/GitLab using Vs code?

Good afternoon!
I came across Git, but in all the training videos / forums, work is done with a local project (website). That is, the project is on the HDD, it is edited, changes are tracked in Github Desktop and sent to Github without any problems.
But how to set up this work if the site is on FTP/SFTP?
Vs Code allows you to work with Git, but how it works is not entirely clear.
I tried to connect to the site using WinSCP and Putty, made changes through winSCP + editor and sent data to the server through Putty, but this does not always work correctly, errors like periodically appear - I made changes to the file, then with the commands git status, add ., commit , I try to send push to the server, it gives out "Everything up-to-date" but in fact the data is old, it didn't even take into account that I created a new branch.

My question, most likely, implies a large answer, but I can’t find this answer in any way, I hope one of you will help by sending a link to sources for study, or can tell you what to look for and suggest the best option.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Skurko, 2020-10-01
@Alexnow33

Good afternoon! Try using the "Remote - SSH" extension for VS Code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question