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
@YoN118710 ай бұрын
I come back to this video waaayy too many times then I would like to admit😁. Thanks Cameron!
@cameronmcnz10 ай бұрын
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! kzfaq.info/get/bejne/q8uBppihtp6-fYE.html
@YoN11879 ай бұрын
@@cameronmcnz Haha. Thanks!
@prashansa-shresthaАй бұрын
i'd been avoiding git for so long but this video finally helped me get started
@dannixon53132 жыл бұрын
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!
@shanebracken-ox7mt Жыл бұрын
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!
@quraanfmurdu2955 Жыл бұрын
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😍😍
@minhkhoivotan65464 ай бұрын
Have you been fired ?
@bigswede889 ай бұрын
I must say that you are a great teacher and very easy to follow. You are born to teach.
@jawad_youtube7 ай бұрын
Clear, concise, to the point. Thanks , sir❤
@cameronmcnz6 ай бұрын
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. kzfaq.info/get/bejne/oNdhhbJzzNOpqqs.html
@fredoenzorodriguez73397 ай бұрын
Yeaaaaah booy...❤❤ after a long search.. thanks Cameron. Am from Cameroon 😅
@cameronmcnz7 ай бұрын
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
@damienbizimungu22314 ай бұрын
Truly you save me ,Much respect indeed for your work 🙏
@cameronmcnz4 ай бұрын
Happy to be of service! Once this Git connectivity stuff gets solved, Git and GitHub becomes a lot easier, trust me!
@javierpacheco4566 Жыл бұрын
Thank you for the video! It help upload an existing project in a different address to the same GitHub repo. Thank!
@cameronmcnz11 ай бұрын
I just did a video suggesting a different, easier strategy. I wonder if this would have worked for you as well? kzfaq.info/get/bejne/q8uBppihtp6-fYE.html
@sms_521Ай бұрын
that force -f did well for me. thanks
@cameronmcnzАй бұрын
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!
@luckyjones65092 жыл бұрын
This was very easy to follow. Thank you!
@cameronmcnz2 жыл бұрын
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!
@kyleh14484 ай бұрын
Thanks a ton, Cameron. Super helpful stuff here!
@cameronmcnz4 ай бұрын
Happy to help. It all gets a lot easier once the connectivity is configured!
@eduardopassero476 ай бұрын
Damn, you just got a subscriber! Thank you so much!
@cameronmcnz6 ай бұрын
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! kzfaq.info/get/bejne/q8uBppihtp6-fYE.htmlsi=uPOj817npb_tmqPs
@NNNedlog Жыл бұрын
I love your style of explanation sir. Great tutorial
@kekoHere06104 ай бұрын
Hi, Your video was very helpful. Thanks for posting this video.
@cameronmcnz4 ай бұрын
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!
@neosinpocket418411 ай бұрын
all these 63k views are from me trying every time to remember how to create project in github
@AhmdIsmail Жыл бұрын
3:15 If you don't do the force, well, the force won't be with you 😂
@cameronmcnz Жыл бұрын
You're hired as my new writer! Thanks for watching past the 3:15 mark!
@007devraj4 ай бұрын
this video really helpful, thanks for your amazing effort.❣
@MikixIT Жыл бұрын
the BEST video about that! Thank you so much.
@devi9058 Жыл бұрын
Best video. It saved my day.
@iyng._.uuuuuu6 ай бұрын
Thank you so much, It was soo useful
@cameronmcnz6 ай бұрын
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. kzfaq.info/get/bejne/oNdhhbJzzNOpqqs.html
@Diego-yx8svАй бұрын
You're the best!
@nethranjaleewijesinghe60118 ай бұрын
wow thank u so much. i really love ur work
@cameronmcnz8 ай бұрын
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! kzfaq.info/get/bejne/q8uBppihtp6-fYE.htmlsi=ek2Gmt6RE50t2kOy
@MohamedMahmoud-pe6qm Жыл бұрын
Thank you! God Bless You
@CG0700 Жыл бұрын
huge help thank you so much
@cameronmcnz Жыл бұрын
You helped yourself by looking in the right spot for a quick answer. Trust me, git gets way easier from here on in!
@abdelhadihabili21013 ай бұрын
may the force be with u brother
@cameronmcnz3 ай бұрын
This is the way.
@AbdulsalaamAzimi Жыл бұрын
Thanks for teaching
@teodortodorov4042 Жыл бұрын
Thank you a lot man. Saved me some time :)
@chef_david1 Жыл бұрын
Thank you for making it easy for us
@anthonyboyle6636 Жыл бұрын
Thank you Cameron 👍
@sakshi-ok8zu Жыл бұрын
clear and concise! thanks for the tutorial.
@media7588 Жыл бұрын
So Thanks You
@mamamama-jw7et Жыл бұрын
thank you you are my hero
@cameronmcnz Жыл бұрын
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!
@ReginaldMcPherson Жыл бұрын
Hey thanks man, much appreciated!
@soulforthekindheart3766 Жыл бұрын
this helped me so much, thank you
@emad_arnesto9175 Жыл бұрын
clearly and simple tutorial thank you sir
@diminaa Жыл бұрын
thanks a million! you helped a lot!
@g-dd-were5763 Жыл бұрын
Hi, but how do I upload to 'main' (!) (and how do I merge 'master' with 'main' after your tutorial? ) Thanks! 🙏
@cameronmcnz Жыл бұрын
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?
@dweebycat9929 Жыл бұрын
Thank you so much!
@aspnet8430 Жыл бұрын
thanks...I subscribed :)
@cameronmcnz Жыл бұрын
Glad I could help! And thanks for the sub!
@kcstorytime48988 ай бұрын
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 .
@cameronmcnz8 ай бұрын
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: kzfaq.info/get/bejne/q8uBppihtp6-fYE.htmlsi=kuW8T8fV3tPLTzAv
@82herrera Жыл бұрын
Thank you sir!!
@ojramos07 Жыл бұрын
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.
@cameronmcnz Жыл бұрын
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.
@ojramos07 Жыл бұрын
@@cameronmcnz Thanks. I'll give that a try.
@quraanfmurdu2955 Жыл бұрын
you earned a subscriber as well as a like ❤❤
@roweeapor Жыл бұрын
The title says add a new project to an "existing" github repo and yet you created a new repo. That is hilarious! 😅🤣
@cameronmcnz Жыл бұрын
Well, it doesn't exist until you create it!
@nunopalomino Жыл бұрын
Thanks
@wenlong1997 Жыл бұрын
Thanks!
@dhruvchaurasia52 Жыл бұрын
Thankyou man
@emilly.aguirre Жыл бұрын
thanks you!
@ThoboMaluleke3 ай бұрын
what if i already have a gihub repository i want to add my js file and my images properly how do i do it .
@ThoboMaluleke3 ай бұрын
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
@cameronmcnz3 ай бұрын
@@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!
@specs719510 ай бұрын
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
@tonycyber2 жыл бұрын
so my git push -u -f main master ... states "100%" .... but the cursor is still loading.... any idea why ?
@solysoly892 жыл бұрын
I subscribed!
@muzamilzaman90789 ай бұрын
I haven't seen .git folder
@cameronmcnz9 ай бұрын
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.
@muzamilzaman90789 ай бұрын
@@cameronmcnz got it thanks
@pezcue9372 жыл бұрын
the git doesn't read all my file, only the read me. I don't understand
@cameronmcnz2 жыл бұрын
Make sure you do the git add. Also make sure you are on the right branch. Check your available branches.
@tonycyber2 жыл бұрын
bro you were funny
@teothedoor Жыл бұрын
may the -f be with you
@CB-rq1vo Жыл бұрын
what is the missouri joke ???
@user-vr5qu4ye2d9 ай бұрын
No clue
@cameronmcnz9 ай бұрын
Clues are free. What can I help you with?
@jfinthetrap Жыл бұрын
1st time it was too hard
@romasokolov2894 Жыл бұрын
wtf are these steps
@cameronmcnz Жыл бұрын
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!