Here's an article I wrote on how to push an existing project to GitHub using the Git add remote and Git push commands. Check it out! www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-push-an-existing-project-to-GitHub
Would you believe me if I told you that I do too? By the way, I produced a new version where you get to see my handsome face! ua-cam.com/video/ueQs5pQ8ZMM/v-deo.html
I've been struggling to get started with using git for a while now (I think I've been putting it off for a year or two now). I've looked at different courses and whatnot, but this video is the best intro I have seen. You did a great job pointing out all of the gotchyas that I haven't been able to wrap my head around. Thank you!
from last 2 weeks my senior developers forcing me to push all my code to their exsiting repositories but I am tired of watching other youtubers then suddenly I clicked here and got my simple answer😍😍
Thanks! I actually have two better ways to do this if you run into problems with the server having a history and you don't want to force the push, which can mess things up if others have pulled from the repo. Feel free to check it out here. ua-cam.com/video/jq1ROBgmEzw/v-deo.html
Glad I could help! I just updated this video with an easier 'cheat method' along with a rebase option that avoids the 'force push.' But if you got what you needed, that's all that matters! Thanks for the kind words. ua-cam.com/video/jq1ROBgmEzw/v-deo.html
I just did a video suggesting a different, easier strategy. I wonder if this would have worked for you as well? ua-cam.com/video/ueQs5pQ8ZMM/v-deo.html
I think I did not link my images properly and I forgot to add my js but i don't want my URL to change at all i noticed that you did that command to create a new repository but like I already said I have it - I just need to link my images and add my js file how do it
@@ThoboMaluleke One way? Just clone the repo. The just copy your files into the cloned repo in the right spot, do a git add, git commit and then git push back to the server. There you go! You're all caught up!
Well, next to rebasing, I think that's one of the harder things in Git to do. So you'll have no problem with all the other Git topics. Thanks so much for the kind words!
For clarification purposes, I have a mac computer and I use terminal which has command line , when you refer to a GitBash Shell inside the local folder, are you referring to me opening up terminal on my mac and cd to the root directory of my project on my computer and inside that directory I do all the Git commands from there ? I am asking as that is what it looks like you are doing but I want to make certain I am not in error as I am wanting to properly push stuff I build on my computer to github .
Yes, you will run these commands from the root folder of the project. There should be a hidden folder in there named .git. By the way, I did update this video with a slightly easier way to do it if you're interested: ua-cam.com/video/ueQs5pQ8ZMM/v-deo.htmlsi=kuW8T8fV3tPLTzAv
My spirit-country!!! ❤Glad I could help. I have an updated video with a trick that makes it easier, but it may be too late for that now. Whatever works! Will have a 2 hour git and github video out next week with better audio and video. Stay tuned! www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-push-an-existing-project-to-GitHub
Glad I could help! Once you get everything connected, Git and GitHub becomes a whole lot easier! I actually updated this video with better audio and video. Helping people love Git and GitHub one person at a time! ua-cam.com/video/ueQs5pQ8ZMM/v-deo.htmlsi=uPOj817npb_tmqPs
Awesome! Now that's best if only you use the repo. If someone else is pushing and pulling, they'll need to re-clone that repo after a forced push. The other option is to rebase, which is safer but a bit more intimidating. Glad I could help!
So, new repos use main, older ones master. Is main on the server or the local? If you have a repo with just master, you can create a new branch called main. Then merge master into main. I didn't test these commands but it'd be something like this: git switch master // this creates a master branch git merge main // this merges main into master so the two are the same Something like that?
It's a hidden folder so you have to set Windows folder options to show hidden folders. I think on the command line/Git BASH you can do ls -a and that shows hidden folders as well. Make sure you are *in* the folder for the project, not a subfolder. After you clone you must CD into the folder Git creates for you.
Thanks for the kind words! I actually have a new version of this with a few tricks to make it easier, although the video you watched is the 'official way.' Also upgraded my mic and got in front of the camera so you can see my handsome face. Again, thanks for the encouraging words! ua-cam.com/video/ueQs5pQ8ZMM/v-deo.htmlsi=ek2Gmt6RE50t2kOy
Being a great dev is all about knowing how to find answers to your problems. You're the hero. You're the one that found the path. I'm just happy to be part of your Git journey. It all gets easier from her on in!
Hi, Great video, I've done this before. I have a unique issue or an issue that I haven't come across as of yet. How to I push or merge a local project to a GitHub repo that already have the same files? So in this caas I have local files and I have the same GitHub files on the remote however the local files aren't setup to use git yet but I want to setup the files to work with the existing files in my GitHub repository. Hope I explained the correctly.
A few ways. What about this: git clone create a new git branch delete all the files in the new branch. copy your project files into that same folder. do a git add and git commit Now all YOUR files are in that new branch. And the project files are in teh other branch. Then you can just merge stuff back and forth. I've done stuff like that before.
All documented in more detail here: www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-push-an-existing-project-to-GitHub Let me know if you have any questions!
Here's an article I wrote on how to push an existing project to GitHub using the Git add remote and Git push commands. Check it out!
www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-push-an-existing-project-to-GitHub
I come back to this video waaayy too many times then I would like to admit😁. Thanks Cameron!
Would you believe me if I told you that I do too?
By the way, I produced a new version where you get to see my handsome face!
ua-cam.com/video/ueQs5pQ8ZMM/v-deo.html
@@cameronmcnz Haha. Thanks!
I've been struggling to get started with using git for a while now (I think I've been putting it off for a year or two now). I've looked at different courses and whatnot, but this video is the best intro I have seen. You did a great job pointing out all of the gotchyas that I haven't been able to wrap my head around. Thank you!
man, thank you! I followed another tutorial that didn't mention force pushing … got stuck for a few hours until I found this video! thank you!
I must say that you are a great teacher and very easy to follow. You are born to teach.
Hi, Your video was very helpful. Thanks for posting this video.
Happy I can help! Git and GitHub gets much easier once you've got your local project and the remote repo connected together, trust me!
i'd been avoiding git for so long but this video finally helped me get started
from last 2 weeks my senior developers forcing me to push all my code to their exsiting repositories but I am tired of watching other youtubers then suddenly I clicked here and got my simple answer😍😍
Have you been fired ?
Clear, concise, to the point.
Thanks , sir❤
Thanks! I actually have two better ways to do this if you run into problems with the server having a history and you don't want to force the push, which can mess things up if others have pulled from the repo. Feel free to check it out here.
ua-cam.com/video/jq1ROBgmEzw/v-deo.html
Thank you so much, It was soo useful
Glad I could help! I just updated this video with an easier 'cheat method' along with a rebase option that avoids the 'force push.' But if you got what you needed, that's all that matters! Thanks for the kind words.
ua-cam.com/video/jq1ROBgmEzw/v-deo.html
Thank you for the video! It help upload an existing project in a different address to the same GitHub repo. Thank!
I just did a video suggesting a different, easier strategy. I wonder if this would have worked for you as well?
ua-cam.com/video/ueQs5pQ8ZMM/v-deo.html
all these 63k views are from me trying every time to remember how to create project in github
Truly you save me ,Much respect indeed for your work 🙏
Happy to be of service! Once this Git connectivity stuff gets solved, Git and GitHub becomes a lot easier, trust me!
what if i already have a gihub repository i want to add my js file and my images properly how do i do it .
I think I did not link my images properly and I forgot to add my js but i don't want my URL to change at all i noticed that you did that command to create a new repository but like I already said I have it - I just need to link my images and add my js file how do it
@@ThoboMaluleke One way? Just clone the repo. The just copy your files into the cloned repo in the right spot, do a git add, git commit and then git push back to the server.
There you go! You're all caught up!
Thanks a ton, Cameron. Super helpful stuff here!
Happy to help. It all gets a lot easier once the connectivity is configured!
This was very easy to follow. Thank you!
Well, next to rebasing, I think that's one of the harder things in Git to do. So you'll have no problem with all the other Git topics. Thanks so much for the kind words!
For clarification purposes, I have a mac computer and I use terminal which has command line , when you refer to a GitBash Shell inside the local folder, are you referring to me opening up terminal on my mac and cd to the root directory of my project on my computer and inside that directory I do all the Git commands from there ? I am asking as that is what it looks like you are doing but I want to make certain I am not in error as I am wanting to properly push stuff I build on my computer to github .
Yes, you will run these commands from the root folder of the project.
There should be a hidden folder in there named .git.
By the way, I did update this video with a slightly easier way to do it if you're interested:
ua-cam.com/video/ueQs5pQ8ZMM/v-deo.htmlsi=kuW8T8fV3tPLTzAv
3:15 If you don't do the force, well, the force won't be with you 😂
You're hired as my new writer! Thanks for watching past the 3:15 mark!
Yeaaaaah booy...❤❤ after a long search.. thanks Cameron. Am from Cameroon 😅
My spirit-country!!! ❤Glad I could help.
I have an updated video with a trick that makes it easier, but it may be too late for that now. Whatever works!
Will have a 2 hour git and github video out next week with better audio and video. Stay tuned!
www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-push-an-existing-project-to-GitHub
Damn, you just got a subscriber! Thank you so much!
Glad I could help! Once you get everything connected, Git and GitHub becomes a whole lot easier! I actually updated this video with better audio and video. Helping people love Git and GitHub one person at a time!
ua-cam.com/video/ueQs5pQ8ZMM/v-deo.htmlsi=uPOj817npb_tmqPs
I love your style of explanation sir. Great tutorial
that force -f did well for me. thanks
Awesome! Now that's best if only you use the repo. If someone else is pushing and pulling, they'll need to re-clone that repo after a forced push. The other option is to rebase, which is safer but a bit more intimidating.
Glad I could help!
this video really helpful, thanks for your amazing effort.❣
the BEST video about that! Thank you so much.
Hi, but how do I upload to 'main' (!) (and how do I merge 'master' with 'main' after your tutorial? ) Thanks! 🙏
So, new repos use main, older ones master. Is main on the server or the local?
If you have a repo with just master, you can create a new branch called main. Then merge master into main.
I didn't test these commands but it'd be something like this:
git switch master // this creates a master branch
git merge main // this merges main into master so the two are the same
Something like that?
I haven't seen .git folder
It's a hidden folder so you have to set Windows folder options to show hidden folders.
I think on the command line/Git BASH you can do ls -a and that shows hidden folders as well.
Make sure you are *in* the folder for the project, not a subfolder. After you clone you must CD into the folder Git creates for you.
@@cameronmcnz got it thanks
wow thank u so much. i really love ur work
Thanks for the kind words!
I actually have a new version of this with a few tricks to make it easier, although the video you watched is the 'official way.'
Also upgraded my mic and got in front of the camera so you can see my handsome face.
Again, thanks for the encouraging words!
ua-cam.com/video/ueQs5pQ8ZMM/v-deo.htmlsi=ek2Gmt6RE50t2kOy
Thank you a lot man. Saved me some time :)
thank you you are my hero
Being a great dev is all about knowing how to find answers to your problems. You're the hero. You're the one that found the path. I'm just happy to be part of your Git journey.
It all gets easier from her on in!
clear and concise! thanks for the tutorial.
Hey thanks man, much appreciated!
Best video. It saved my day.
Thank you! God Bless You
Hi, Great video, I've done this before. I have a unique issue or an issue that I haven't come across as of yet. How to I push or merge a local project to a GitHub repo that already have the same files? So in this caas I have local files and I have the same GitHub files on the remote however the local files aren't setup to use git yet but I want to setup the files to work with the existing files in my GitHub repository. Hope I explained the correctly.
A few ways.
What about this:
git clone
create a new git branch
delete all the files in the new branch.
copy your project files into that same folder.
do a git add and git commit
Now all YOUR files are in that new branch. And the project files are in teh other branch.
Then you can just merge stuff back and forth.
I've done stuff like that before.
@@cameronmcnz Thanks. I'll give that a try.
this helped me so much, thank you
Thank you for making it easy for us
Thank you Cameron 👍
huge help thank you so much
You helped yourself by looking in the right spot for a quick answer. Trust me, git gets way easier from here on in!
thanks a million! you helped a lot!
Thanks for teaching
so my git push -u -f main master ... states "100%" .... but the cursor is still loading.... any idea why ?
clearly and simple tutorial thank you sir
you earned a subscriber as well as a like ❤❤
thanks...I subscribed :)
Glad I could help! And thanks for the sub!
how do i add new file on existing repository like for example i already push a file on a git repository then i want to add another how do i add it
So Thanks You
You're the best!
Thank you so much!
Thank you sir!!
I subscribed!
Thankyou man
The title says add a new project to an "existing" github repo and yet you created a new repo. That is hilarious! 😅🤣
Well, it doesn't exist until you create it!
thanks you!
the git doesn't read all my file, only the read me. I don't understand
Make sure you do the git add. Also make sure you are on the right branch. Check your available branches.
Thanks!
Thanks
bro you were funny
No clue
Clues are free. What can I help you with?
1st time it was too hard
wtf are these steps
All documented in more detail here:
www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-push-an-existing-project-to-GitHub
Let me know if you have any questions!
may the -f be with you
what is the missouri joke ???