Posts

Showing posts from October, 2020

GIT QNA

  --_________--___-_________-------___--_ 1) Warning! --_________--___-_________-------___--_ $ git add index.html warning: LF will be replaced by CRLF in index.html. The file will have its original line endings in your working directory Solution : git config core.autocrlf true 2. Whille trying and merge the new branch to master error is : fatal: refusing to merge unrelated histories --_________--___-_________-------___--_ Solution : --_________--___-_________-------___--_ The error is resolved by toggling the  allow-unrelated-histories  switch. After a  git pull  or  git merge  command, add the following tag: git pull origin master --allow-unrelated-histories

git with github

Image
  Scenario 1: -------------------------------- ***Suppose I h ave a GitHub account and I want to connect that account's project and repository with m y l ocal git bash so that I can push the codes to the GitHub or can take pull also. connec t git bash to your GitHub repository First I will log in to my GitHub account. There I will create a project and a repository inside that project. I will copy that repositor y link. Let my repository link is   github_repository_link Now, let I wan t to make a local project directory where I can save my work and will push my code to GitH ub or take a git pull. Let it is in D drive --> Java --> codes I will be inside the  D drive --> Java --> codes  folder and  right-click there -- > choose option  "GIT bash here" Now t he git bash edited will be opened where we will write the command to connect to git hub account... Command : ----------------------------------- $ git r emote add origin  github_repo...

Bitbocket with GIT

Image
  Create a bitbucket account at Atlassian. Sign up. create a repository. Then click on clone repository Then a link will be displayed . Copy that link and go to git bash . create a folder ( I have created as repo ($mkdir repo)) . go inside the folder using cd command with folder name ($cd repo) . paste the copied link there and enter. Cloning will be done. I n the above ss as my password was wrong so first attempt failed ...in second I reset my password in bitbocket and then it worked.In the middle it asks for password of bit bucket to proceed. #bitbucket #git #gitWithBitbucket #gitVsBitbucket

Git Commands With Output Log

Step by step command only Guide where command starts with symbol $ ----------------------------- git config -- global user . name "your username"   git config -- global user . password "your password" Track file : This means the file is added to the git repository in your local machine. Also called added to the stage area. Untracked File : Code is still in your local folder not added to git repository ----------------------------------------------- Commands --------------------------- checking current working directory  rssan@DESKTOP-QA9A7TD MINGW64 ~ $ pwd /c/Users/rssan creating a new directory rssan@DESKTOP-QA9A7TD MINGW64 ~ $ mkdir test getting inside that newly created directory rssan@DESKTOP-QA9A7TD MINGW64 ~ $ cd test creating a new directory inside for git repository rssan@DESKTOP-QA9A7TD MINGW64 ~/test $ mkdir repo getting inside the newly created repo directory rssan@DESKTOP-QA9A7TD MINGW64 ~/test $ cd repo/ Again created a mygitrepo directory inside rss...

Java Interview Preparation (Coding Basis)

Java Interview Preparation (conceptual)

Image
 All Concepts sumerized .... ------------------------------------------------------------- *** Java is partially Object-oriented as it has primitive types. (Primitive i.e. int, float are not the objects, to convert them to use as Object, we use wrapper class) ***Java is platform-independent but JVM dependent. And JVM is platform dependent because for Linux there is a different JVM whereas for windows it's different. _-_____-----___--___--____--- Oo ps Conc ept  _-_____-----___--___--____--- abstraction ,  encapsulation ,  inheritance ,  polymorphism .  Inheritance : Real-World Example : Children have some of the qualities of their parents and grandparents or their ancestors. Java Example: There is a method in the parent class and you want the same method to create in a child class. Why create a new one if it already exists. As a child, you can inherit the method. There are a few variables in a class and you need them .So why to create new variables. We can ...