R
R
romanovaviktoriya2021-12-27 14:43:47
1C-Bitrix
romanovaviktoriya, 2021-12-27 14:43:47

How to add a GitHub repository to an existing Bitrix hosted project?

There is a hosting with a working site on 1C-Bitrix. You need to start using git. Created a private repository on GitHub. Added .gitignore file and that's it. Just copying the .git folder to the hosting will not help, I think. How to work in general? You need a terminal/command line, but where can I get it. To edit files, I use WinSCP (I connect via ftp, open the desired file in my favorite editor and edit it, then save it).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FernandoErrNando, 2021-12-27
@FernandoErrNando

Read more about git, how it works and why you need it. In short, you must:
1. Add the files to the repository on your computer and commit. When creating a repository in the github, detailed instructions are given on how to do this:

spoiler

git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/%YOURUSER%/%REPONAME%.git

2. Upload changes to github (git push -u origin main)
3. on the remote server, do git clone (if you haven't already) or git pull.
You don't need WinSCP now, you need to connect to the server via ssh and use the command line there. The command line is in Windows by default.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question