Tuesday, September 4, 2018

GIT push and commit

Steps:
  1.  Before starting your code, please update the local code this command. "git fetch origin"  then git pull origin development. here development is the branch name
  2. After finishing the code, again run the command "git pull origin" to check code is update by other team mate;
  3. If conflict occurs, then firstly commit your local code. To commit use "git gui" specially at Bjit. Then using git gui, commit your code
  4. Then run "git log --oneline -5" to check local commit history
  5. "git log --oneline -5 origin/development" to check remote commit history. here development is remote branch. ASD all code belongs to development branch
  6. git checkout origin/development / "git checkout sha1" run this command. this sha1 number  will be the  remote branch latest sha1 number or head number. sha1 like ec7eed. at this position detach head will be created. then you need to create branch otherwise it will be lost. we can run
  7. "git checkout -b branch_name" after running the 6 step command then you need this command. here branch_name is variable. branch_name should be task related
  8. "git cherry-pick sha1" this sha1 will be local commit.
  9. if there is conflict, solve the conflict and again commit and push
  10. for no conflict, just push the code. "git push origin HEAD:refs/for/branch_name"  here branch_name is development so, ex: git push origin HEAD:refs/for/development".

NOTE:  "git log --oneline -5 origin/development" after running this commandm, may we not get update log that time run "git fetch origin"


GIT Clone: 
  1. clone command: git clone ssh://tushar.ghosh@review2.bjitgroup.com:29418/p1207_asd_clientapp_dataentry
  2. cd project folder name
  3. git checkout development : firstly check locally then not found check remote-if match then make a development branch with all remote development commit/code;
  4. after 2: git checkout development1  - showing error message this branch not found
  5. after 2:  git checkout -b development : this time create new branch with courrent branch commit/code;
    1. git pull origin development : it will pull commit from remote development
  6. git checkout origin/development or
    git checkout last_sha1_of_branch is same. Here development is branch; 


GIT Architecture :



Autoboxing and Unboxing

  Autoboxing  is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper cl...