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.
Asked
Active
Viewed 95 times
0
-
https://stackoverflow.com/search?q=%5Bgit%5D+resolve+detached+head – phd Jun 08 '20 at 11:11
1 Answers
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
-
Just one more thing. in their repo they push everythihg to the dev branch, how can i do the same. – Kartik sharma Jun 08 '20 at 10:35
-
-
You can mark the answer as accepted and upvote it if your problem is resolved – Raj Yadav Jun 08 '20 at 10:40