Reputation:
To deploy my Laravel app to my server, I decided to just download the zip file and unzip it in the folder. However, I made some changes on my server and I would like to push them to GitHub. Since there is no .git folder, I don't get how am I supposed to commit the changes or pull from the repository.
Can you help me ?
Upvotes: 1
Views: 3501
Reputation: 193
I've successfully done that following way:
mv repo repo-bak
git clone <url>
mv repo/.git repo-bak
rm -rf repo
mv repo-bak repo
cd repo && git status
Upvotes: 1
Reputation: 44
If you have a repo already that has commits do:
git clone git@REPO_LOCATION_INFO
Check out a new branch on your local:
git checkout -b branch-name
Make your changes, save, add, commit, and push them:
git add .
git commit -m "My commit message"
git push origin branch-name
then open a pull/merge request in your repository and merge to master.
Otherwise you can remote the folder on your local to your repository with:
git remote add origin [email protected]:user/repo_name
and then commit like shown above.
Hope this helps!
Upvotes: 3