Git And GitHub
# for adding or initialize repository
git init
# check status#
git status
# add all folders and file #
git add .
# If you want add file restored from staged
git staged
# for git commit #
git commit -m "first commit"
# set main brach is main#
git branch -M main
# set remote origin#
git remote add origin https://github.com/Akashshere19/dealerApp_kur.git
# Remove origin remote
git remote remove origin
# push your code on git hub#
git push -u origin main
# push force fully when show -----> ! [rejected] main -> main (non-fast-forward)
git push -f origin main
# remove initializing#
rm -rf .git
# showing history of work
git log
# showing history of work
git log --stat
# showing history of work
git log --graph
# showing history of work
git log --graph --oneline
# switch on another branch
git checkout
#show set remote
git remote -v or git remote -vv
# show local branches and last commit
git branch -v or git branch -vv
# for new project upload
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://git.......
git push -u origin main
Comments
Post a Comment