Skip to content
This repository was archived by the owner on Sep 22, 2022. It is now read-only.

C on Git (HowTo)

cubazis edited this page May 23, 2018 · 5 revisions
  1. Create new C99 project in Clion
  2. Create a new repository on GitHub

Let's imagine that your repository has URL like that https://github.com/MY_NAME/my_c_project/


  1. Create a new file named README.md and add first string "# My " in it
	echo "# My awesome C Project in Git" >> README.md
  1. Create file .gitignore
  2. Add into git .gitignore necessary strings
  3. Add main.c (if it hasn't been created)
  4. git init
  5. Check by git status (.idea has to be removed from untracked)
  6. git add .
  7. git commit -m "Lost commit"
  8. git remote add origin git@github.com:MY_NAME/my_c_project.git
  9. git remote set-url origin git@github.com:MY_NAME/my_c_project.git
  10. git remote -v
  11. git push origin master

Be careful. Don't just copy commands. Change MY_NAME to your alias on github, change my_c_project to your project name.

Clone this wiki locally