0

Being new to git and gitlab, instead of cloning the repository i downloaded it,fixed bugs in it over 100+ files have changed, now i want to push it to gitlab. I have tried -Cloning the repository...then pasting all the contents of the downloaded repo and commiting, didn't work. it says detached head. Is there any way to show all my changes on the cloned library and successfully push it.

1 Answers1

0

Navigate to your project directory using cd command then,

- git init
- git remote add origin <repo_url> # copy from your repository, either SSH or HTTPS (Note: SSH requires SSH keys to be added for your device)

After this, you can follow your usual git commands like,

- git add . # add all project files
- git commit -m <commit_message> # commit the latest changes
- git push # push changes to the remote repository

Note: Confirm your .gitignore file before committing any changes

Raj Yadav
  • 9,677
  • 6
  • 35
  • 30