Some hints on github: Difference between revisions

From The Yambo Project
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
1) Whenever you edit subroutines and other files, and if you desire that your changes do not get lost, prepare a commit file.
1) The easiest way to switch branch on Git is : git checkout <desired_branch>
*) In order to set the proper layout for the commit: ./sbin/git_configure_and_hooks.sh
2) Before starting working on your own code/branch type '''git pull''', to ensure that your work will be later merged to the updated version of the code.
*) Then type:  git commit -a  
 
3) Whenever you edit subroutines and other files, and if you desire that your changes do not get lost, prepare a commit file.
*) In order to set the proper layout for the commit type ./sbin/git_configure_and_hooks.sh
*) Then type:  '''git commit -a'''
*) Edit the file accordingly, pointing out your most important changes.
*) Edit the file accordingly, pointing out your most important changes.


2) Git push, is the command to save a record of your work.
4) '''Git push''', is the command to save a record of your work.
 
3) Before starting working on your own code/branch please type: git pull, to ensure that your work will be later merged to the updated version of the code.  


4) If you are interested in comparing your last downloaded version of the branch with a previous one, type
5) If you are interested in comparing your last downloaded version of the branch with a previous one, type
git log | less  → you will have a list of modified files and identify the “long alphanumerical string”  on the right of the word commit.
git log | less  → you will have a list of modified files and identify the “long alphanumerical string”  on the right of the word commit.
git diff “long alphanumerical string” > a → It is better to redirect the outcome to a file called here “a”
git diff "long alphanumerical string” > a → It is better to redirect the outcome to a file called here “a”

Latest revision as of 10:53, 7 January 2022

1) The easiest way to switch branch on Git is : git checkout <desired_branch> 2) Before starting working on your own code/branch type git pull, to ensure that your work will be later merged to the updated version of the code.

3) Whenever you edit subroutines and other files, and if you desire that your changes do not get lost, prepare a commit file.

  • ) In order to set the proper layout for the commit type ./sbin/git_configure_and_hooks.sh
  • ) Then type: git commit -a
  • ) Edit the file accordingly, pointing out your most important changes.

4) Git push, is the command to save a record of your work.

5) If you are interested in comparing your last downloaded version of the branch with a previous one, type git log | less → you will have a list of modified files and identify the “long alphanumerical string” on the right of the word commit. git diff "long alphanumerical string” > a → It is better to redirect the outcome to a file called here “a”