#Cannot open github clone in Intellij

1 messages · Page 1 of 1 (latest)

idle scrollBOT
#

<@&987246964494204979> please have a look, thanks.

idle scrollBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

#

Activities have been reset.

livid pivot
#
  • create a github project
  • clone it
  • learn git
  • voila
#

then clone it

livid pivot
#

no

#

clone it once

#

once per computer

molten temple
#

Once upon a time I copy pasted files on a flashdrive because I didnt know about git or how to use it.
Long story short - use git

#

once you get it setup you just do all ur changes on one PC, when ur done with it, commit+push, go to other PC and pull changes

livid pivot
#

you need to add the modification

#

then commit

#

then pull

#

and in the other computer you pull

molten temple
#

on?

livid pivot
#

?

#

pull is

#

git pull

#

I won't talk about gui here

molten temple
#

thats a gui for it, just hover over it

livid pivot
#

only command line

molten temple
livid pivot
#

first learn in command line please

livid pivot
#

alright so

#

the way git work

shadow shadow
#

git pull and push is like downloading and uploading from a dropbox

livid pivot
#

you have a distant repository

shadow shadow
#

think about it like that

livid pivot
#

which is on github

shadow shadow
#

ur git repo is not directly connected or autosynced

livid pivot
#

and you may have local repositories, which are on computer

shadow shadow
#

u can upload and download

idle scrollBOT
#

@shadow shadow

While we appreciate all efforts to help individuals, when multiple people join a conversation it can often get confusing for those asking for help. Members may be trying to lead someone down a particular thought process to get to the answer and interrupting can break this.

As a general guideline, try to avoid interrupting ongoing help scenarios unless:
• You feel incorrect information is being given.
• The question has subjective answers.
• The original helper is no longer responding.

You can of course always add additional information after the initial problem has been solved.

livid pivot
#

let me show you a screenshot

#

the distant repository is github

#

the local repositories are the computers, like yours

#

first you only have your project on github

#

so you do a git clone, so you get a copy of it in the local repository, in your computer

#

when you make change to the project, you can push them to the distant repository

#

they will be visible from github (you can check)

#

and then you can pull them on another computer

#

do you understand that ?

#

now

#

you need to understand that your changes must be commits

#

it's basically a mini version

#

like, have you tried to see the history of google drive doc files ?

#

yes

#

but contrary to google drive

#

here you have total control of it

#

so a commit may contain several file change

#

and must have a name

#

every commit must have a name

#

so you can make a commit "Modified the file XXX with YYY"

#

and so, when someone checks the history, he will see this commit

#

in order to do a commit

#

you need to tell to git what you want to commit

#

because you may modify several files but only want to commit some of them

#

so you git add the files you want to commit

#

and once you think you added all the files you want to commit

shadow shadow
#

when u push, it doesnt upload "all ur changes". it uploads ur commits. u have to first pack ur changes in commits. then push.
then they also appear in github and will be there when u pull on the other side

livid pivot
#

you can run git commit -m "The commit message here"

#

wdym

#

you commit changes

#

and once you commited, you can push so the distant repository is up to date
then you may check directly on github to see if it go the changes

#

and then you can pull on another computer

#

git add *

#

if you don't want to git add myfile for every file

#

and then you commit

shadow shadow
#

in ur intellij gui its displayed in a side panel as staged and unstaged changes

#

and u can click on a commit button

livid pivot
#

and yea ↑ on a gui like intellij or vsc, you get a panel with two sides, one with the files you want to commit, the other with the files you don't want to commit, and you simply just click button to make the files change sides, it will do the git adds for you

#

yes

#

that's the same

shadow shadow
#

its just that the gui will sometimes fail or not have the granularity u need. so occasionally u have to revert to console

#

that's a rather complex story for another day. but for now, either will be fine

#

did u commit and push the commits already? are they on github?

livid pivot
#

what happens if someone else pushed commits to the distant repository, and you youserlf commitied something, how is git supposed the two different commits, that's the whole problematic here, and I think it's not a problem for now, so check click ok

shadow shadow
#

maybe ur on another branch

livid pivot
#

what is the last commit on github ?

#

but is the commit visible on github ?

#

so in the other local respository

#

when you git pull

#

it idn't get the change ?

#

on the terminal

#

any kind of terminal

#

even intellij terminal is fine

#

doesn't matter

#

the git terminal just has some auto completion and syntax highlighting that's all

#

you don't really need it

#

what happens if you run git status ?

#

push updates the distant repository with the commits of your local repository

livid pivot
#

did you do git status ?

shadow shadow
#

what's the upstream. maybe ur connected with a fork?

#

was the thing private or can u share a link?

#

can u do git status on the other machine

livid pivot
#

ah yes, basically branches are a things, you are on branch master
"origin" is distant repository so origin/master is master on distant repository
so your branch master is up to date with master in github, so everything is fine 🤔

can you try git fetch --all, and take a screenhot of what it shows ?

idle scrollBOT
#

Closed the thread due to inactivity.

If your question was not resolved yet, feel free to just post a message to reopen it, or create a new thread. But try to improve the quality of your question to make it easier to help you 👍

idle scrollBOT
#

Activities have been reset.

#

Cannot pull from git repo

#

Changed the title to Cannot pull from git repo.

livid pivot
#

if you do git log what dpoes it show ?

livid pivot
#

yes

idle scrollBOT
#

Activities have been reset.

livid pivot
#

you have the history of commits here

#

is tesstff the commit where you try to modify something ?

#

wdym

#

do you see your commit here ?

#

which file did you edit ?

#

in the log, do you see it ?

#

what is the name of your commit ?

#

then go to your pc then

#

do git pull again

#

and then git log

#

and show me

#

did you clone the project ?

#

you tried ?

#

you need to clone it in your pc

#

did you clone the project in your pc or not ?

#

then ?

#

did it work ?

#

no

#

something happened

#

no

#

when you run git clone

#

it will create a folder containing the project

#

that it cloned from github

#

in the folder where you did the clone

#

like

#

you already did that

#

in your laptop

#

it's the same thing

#

what

#

how do you already have your project ?

#

you just said you already have your project on the pc

#

ok so

#

delete the project that you have in your PC, and instead clone it from github

#

where did you do the clone ?

#

right

#

so now go inside the folder that just appeared

#

and do git status

#

show the result

#

what

#

do git reset --hard origin/master

#

what did you do

#

so

#

exit intellij

#

and any terminal

#

delete the project

#

open a terminal

#

and run git clone

#

what is your command ?

#

what command did you use ?

#

and what is the terminal saying ?

#

you didn't delete the project

#

it already exist

#

so it can't do a clone

#

seems like

#

delete AdPlug

#

hmm

#

try

#

git config --system core.longpaths true

livid pivot
#

open the terminal with admin permissions

#

just for this commandf

#

did you delete this file ?

#

like the .jar

#

at the middle of the message

#

delete it

#

then add and commit

#

by deleting it

#

no

#

well you can

#

it doesn't matter

#

then add and commit

#

like always

idle scrollBOT
#

Activities have been reset.

#

Cannot open github clone in Intellij

#

Changed the title to Cannot open github clone in Intellij.

shell pewter
#

do they show in the windows explorer?

#

so you verify that they actually exist

#

how did you open the project?

#

show the full folder when cloning it

#

so the content in the file explorer

#

opening with this should work fine:

File > New > Project from existing Source > 

and then select the root directory of this project

#

this menu supports pom.xml projects

#

so it should work fine

#

select the folder that got this content

shell pewter
#

is your pom.xml really a pom.xml?

#

why does it get associated with microsoft edge?

#

show your pom.xml

vital pendant
#

Fyi to commit all modified files u can use the -a flag

#

U can do git commit -am "message"