0% found this document useful (0 votes)
6 views

git cmds local to remote

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

git cmds local to remote

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

# local to remote commnds

#first you have to crate the new repo in git hub


# where your project present in the same location you need to open your git bash
#before doing this you have crate one new repo in git hub then come to git bash
# after open git bash create one folder in git bash with the same name of your
repository name
then to create you have to write command
$ mkdir <foldernmae-similar your repo name>
# after you switch that folder
# to switch folder you write cmd
$ cd <foldername>
# after went to folder then see your main or not if it not main then your branch
i.e is main
to change that main you have write cmd
$ git branch -m <brnchname>
# after changing brach i.e is main
# after that you add your files at staged area
then you have write command
$ git add .
# after you have to push your local to remote before push you have do one thing i.e
is
commit
$git commit -m "you <have writr some msg>
ex git commit -m "my first project"
# after commiting then you have push you project in local machine to remote
machine
then you have write command
$ git push add -u <-u meain upstream > key <mean origin> value<mean url>
ex : $ git add -u origin https://github.com/sandeepg76/docker-spring-boot.git
# now push your project in remote
then write cmd :
$ git push
note * local to remote use push
* remote to local use pull

You might also like