Monday, October 19, 2020

github from terminal

GitHub

 

 

 On this topic we will explain how to deal with github from terminal 

First : if you don't have account on github , you can create it from here , then follow me :)

 

Login to git hub from terminal by the command 

git config --global user.email "your_email_address@example.com" 

 

Initialized empty git repository 

git init


Remove the initialized empty repository 

rm -rf .git


Show repository activity log

git log


Clone files from the repository in the current folder 

git clone repo_url . // the . means that we want to clone files in the current directory

 

View the information about the repository 

git remote -v 


List all branches in the repository 

git branch -a


Show the changes that we had made to the code 

git diff

 

Add all working files to the staging

git add -A


Commit the add files in the local device 

git commit - m "Some Message :)"


Push the committed changes locally to the remote repository at git.com (2 steps < pull and push >)

git pull origin branch_name // to check if any other developer make any changes in the repository (origin is the name of the remote repository)

git push origin branch_name // to push our changes to the repository (branch)

 

Create new branch 

 git branch branch_name  // this will create new branch in the current repository 

 

Switch the current working with branch 

git checkout branch_name 


Push changes to specific specific branch in the remote repository

git push -u origin branch_name // #not : we can to pull by this way too

 

Merge a  branch with the current branch 

git branch --merged

git merge branch_name


Delete Branch

git branch -d branch_name // this will delete the branch from the local 

git push origin --delete branch_name // this will push the deleted branches to the remote repository 



Note :

you can download the ref form here




No comments:

Post a Comment

Odoo Invoice Qr code issues

There are two main issues must of us facing with the QR code in Odoo invoice & these issues are 1/ QR code displayed as broken image w...