#๐Ÿ”’ my first small project for GITHUB

162 messages ยท Page 1 of 1 (latest)

shrewd verge
#

help me

smoky depotBOT
#

@shrewd verge

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

upbeat orbit
shrewd verge
#

yes

upbeat orbit
#

ok open it

#

Is it empty?

#

Is there any files in it?

shrewd verge
#

nope

#

i tried the steps given by gitub but nothing happened

upbeat orbit
#

ok so it should show instructions on how to commit to your files to your repo

#

Can you show the steps please?

shrewd verge
upbeat orbit
# shrewd verge

ok which one did you do and where did you do them in your computer?

shrewd verge
#

the later one...after initializing git in the folder from git

upbeat orbit
shrewd verge
#

i did it

upbeat orbit
#

run git status

shrewd verge
#

ok wait

#

i did it but doesnt show in git status

upbeat orbit
# shrewd verge

yea thats not added yet. The message says these files are not tracked and you have to use git add

#

run git add .

#

and hit enter

shrewd verge
#

i dont want to add everything

upbeat orbit
#

ok what do you wanna add?

shrewd verge
#

project is very small

#

one module

#

with few lines

upbeat orbit
#

which file is that?

shrewd verge
#

it is commited i think

upbeat orbit
upbeat orbit
shrewd verge
#

average temperature something like this

#

how to check commits

upbeat orbit
shrewd verge
#

it is committed @upbeat orbit

#

now what

#

u there?

upbeat orbit
#

and show me the output for git log -p -2

shrewd verge
#

some little errors in the name

upbeat orbit
# shrewd verge

ok so the file is word_frequency_counter.py. Is that right?

shrewd verge
#

yes

#

how can i change the name

#

is it going to show int he github too?

upbeat orbit
#

Show me git remote -v

upbeat orbit
shrewd verge
#

it should be temperature freq counter

upbeat orbit
upbeat orbit
shrewd verge
upbeat orbit
#

Double check and confirm you are referring to the correct file before its pushed to your repo

shrewd verge
#

i want to change the name to > temperature freq counter

upbeat orbit
#

oh ok. Then just rename the word_frequency_counter.py file to the new filename

#

let me know when you've done the rename

shrewd verge
#

its done

upbeat orbit
#

ok

upbeat orbit
shrewd verge
upbeat orbit
# shrewd verge

right. So next run the following commands:
git add temp_frequency_counter.py
git commit -m "Changed filename"
git push -u origin main

shrewd verge
upbeat orbit
shrewd verge
#

still nothing happene in the github

upbeat orbit
shrewd verge
#

oh..so it is running different account

upbeat orbit
shrewd verge
upbeat orbit
shrewd verge
#

its my siblings account

#

i want to add in ajaylodhi20

upbeat orbit
#

you guys are sharing the same PC?

shrewd verge
#

she doesnt use github for now...i use it mostly

upbeat orbit
#

should consider not sharing the same user account at least on the shared PC

shrewd verge
#

okay

#

so what should i do

upbeat orbit
#

hmmm

#

IMO, I really don't like this shared setup on one user account

#

Can you backup your files onto a thumbdrive and then create a separate new user account for yourself?

shrewd verge
#

like when the pc starts..there?

upbeat orbit
#

Do you know how to set up a user account?

shrewd verge
#

no

#

cant i change here

upbeat orbit
#

cuz you're sharing your accounts with your sibling, the configuration could get messed up

shrewd verge
#

i mean ...can i remove my sibling's account for now

upbeat orbit
#

and if your sibling wants to use?

#

they would need to re-add back in, no?

shrewd verge
#

i will create a new user account

upbeat orbit
#

yea thats better

shrewd verge
#

so..

upbeat orbit
#

oh you mean, the new user account is for your sibling?

shrewd verge
#

yes

upbeat orbit
#

oh alright then

#

you'll have to run git config

#

wait I forgot the full command

#

oh hang on...

#

there's actually 1 additional step before git config

#

you need to set up credentials on your local machine to push to github

#

did you set up ssh keys?

#

or git credential manager?

#

@shrewd verge

shrewd verge
#

yes, from pycharm

upbeat orbit
upbeat orbit
shrewd verge
upbeat orbit
#

interesting. Didn't know Pycharm can do this

shrewd verge
#

will this work?

#

or do i need ssh key for git

upbeat orbit
#

Can you show me a full screenshot of your pycharm?

#

There could already be a way to quickly and easily push your commits to github without running commands

shrewd verge
upbeat orbit
#

It should show something like this

#

Look for this icon

shrewd verge
upbeat orbit
#

there we go

#

Click the checkbox next to the file

shrewd verge
#

and?

upbeat orbit
# shrewd verge

Oh wait... Double check if the file is properly renamed to what you wanted

upbeat orbit
# shrewd verge

Otherwise, expand the "Unversioned Files" to see if the renamed file is there

#

If its not properly renamed, rename it first and then check the checkbox in "Changes"

#

Then at the bottom, where you see Commit Message. Enter a commit message like "Changed word_frequency_counter.py to temperature counter file" or whatever you want.

#

Then click "Commit and Push"

#

@shrewd verge ?

shrewd verge
#

i renamed the wrong file

upbeat orbit
#

ok

#

ping me when you're ready

shrewd verge
#

i want to delete this and add the new renamed file

#

@upbeat orbit

upbeat orbit
shrewd verge
#

its inside one more folder..

#

i.e. LIST

upbeat orbit
# shrewd verge

I can see LIST is in the current project folder. You could move the file from LIST and to the root of the project folder and then rename the file in Pycharm

upbeat orbit
#

Then check the checkbox in the "Unversioned File" for specifically that file

shrewd verge
#

i committed but still nothing happened in the github

#

i got to go

upbeat orbit
shrewd verge
#

yes

upbeat orbit
# shrewd verge yes

What happened after that? Did anything pop up? Notification? some git log?

#

But if you have to go, just go. Come back and open a new help thread when you need it

shrewd verge
#

i clicked on commit instead of commit and push

#

wait

#

this came

#

are all going to be pushed if i clicked on the push?

upbeat orbit
# shrewd verge

thats kinda nice looking. What does it say if you click on the first "my project" in that list on the left?

shrewd verge
#

done

upbeat orbit
#

good job

shrewd verge
#

i will do rest of the settings later

#

thank you

#

bye

upbeat orbit
#

np

shrewd verge
#

!close

smoky depotBOT
#
Python help channel closed with !close

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.