#Getting to know Clion and Github how they work

100 messages ยท Page 1 of 1 (latest)

vast aspenBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

worldly escarp
#

you generally have one main per project / per executable

pine thunder
#

what if I need to upload them to github tho. can i upload more than one project (having different programs) in the same repo?

worldly escarp
#

yeah you can have a repo that has serveral projects

pine thunder
#

oh ok so let me just do 5 different project than haha

#

and which version of c is recommended to code in?

worldly escarp
#

C99 onwards

pine thunder
#

c17 is good?

worldly escarp
#

sure

pine thunder
#

ok tks

#

ok I have my 4 projects. How shall I upload them to my repo on github?

#

the first 4 are my projects, and the last 1 is my repo

#

should i drag the project folders to the repo?

shy fiber
#

Idk about clion, but in vs there's a thing called "solution" that is basically a container for projects. There should be similar functionality in clion ๐Ÿค”๐Ÿค”

pine thunder
#

what does "solution" do tho?

shy fiber
#

Container of projects

#

Oh I see, it uses cmake ๐Ÿค”๐Ÿค”

#

In cmake, there's "targets", and each target is basically an executable you want to compile

pine thunder
#

well our professor told us to use cmake. Im not sure what it does tho

shy fiber
#

Basically you need to create separate target for each task

pine thunder
#

what do you mean by targets tho?

#

i just have to uploade the code onto github

#

is it possible maybe it has something to do with the build fuction on Clion

shy fiber
#

Uhmm you first need to initialize a git repository

#

Commit all the files

#

Then upload

pine thunder
#

i do already have a repo. Im not sure how to upload my files tho

shy fiber
#

Create an empty repo on github

#

Copy the link to it

#

Set it as remote

#

Then push

pine thunder
#

i coppied the link, now how do i set it as remote haha

shy fiber
#

Hmm search somewhere in clion

pine thunder
#

ill search 1 min

#

hmm does this mean my code is uploaded?

shy fiber
#

Idk

#

Well they're uploaded if you can see them on github

pine thunder
#

i have no clue where to check

shy fiber
#

Ok seems not uploaded

#

Did you commit?

#

It seems like you're in a commit menu

pine thunder
#

no what is that?

shy fiber
#

It's add the files to the local repository

#

Only after that you can upload the local repository to github

pine thunder
#

i think i commited but nothing happened

shy fiber
#

Now you can publish/push

pine thunder
#

from where from the desk or web version?

shy fiber
#

From clion

pine thunder
#

its saying this

shy fiber
#

Well from what directory are you running this command

pine thunder
#

wdym?

#

from clion

shy fiber
#

Type

pwd
#

What does it output

#

Hmmm

#

You need to upload while in the folder where your repository is

pine thunder
#

oh ok so ill move these clion files into the respo and then do this?

shy fiber
#

What files

pine thunder
#

these projects im working on

shy fiber
#

Aren't they already there

pine thunder
#

i removed them now theyre back in their

shy fiber
#

Well ideally you shouldnt have to move anything anywhere

#

Well you can try now

git push 
pine thunder
#

well something happened but it aint allowing me to enter my password haha

shy fiber
#

Probably it just isn't displayed

#

Just type like normal and press enter

pine thunder
#

what now

shy fiber
#

Lol

#

Oh no

#

You probably have to set up ssh or something

#

๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ

pine thunder
#

whats that ๐Ÿ˜ข

shy fiber
#

Well it gave you a link

pine thunder
#

this shit is so confusing

#

why the hell do people use github

shy fiber
#

To collaborate on a project I guess. Or just to store their code

pine thunder
#

I think i did it!

shy fiber
#

๐Ÿค ๐Ÿฅณ๐Ÿค˜๐Ÿ’ซ๐Ÿ“ˆ๐Ÿ“ˆ๐Ÿ“ˆ

pine thunder
#

yes!

#

why was that so hard ๐Ÿ’€

shy fiber
#

Well this probably should be explained gradually at university

#

Like, first hello world

#

Then program with multiple files

#

Then make

#

Then cmake

#

Then git

#

Not just thrown like this ๐Ÿค”๐Ÿค”

pine thunder
#

exactlly that what i was saying

#

im so tired of uni already such bull

#

also is their a command or a way to update the files?

#

thank you very much @shy fiber for your help really means a lot. although im going to delete this post due to I have a lot of information about me and professor hahah. Thanks again

vast aspenBOT
#

@pine thunder

Please Do Not Delete Posts!

Please don't delete forum posts. They can be helpful to refer to later and other members can learn from them. In the future you can use !solved to close a post and mark a post as solved.

shy fiber
#

Yes

#

You commit and push again

#

That's the whole point of git

#

It's a "version control system"

vast aspenBOT
#

@pine thunder Has your question been resolved? If so, type !solved :)

pine thunder
#

!delete

#

lol isnt their a way to delete?

#

!solved