Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!

Wade Zhang

Greenhorn
+ Follow
since Nov 12, 2018
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Wade Zhang

NetBeans is the best for web projects.
If you mean force to two repo be the same version, you can add "-f" to push
Firstly, you need to download Git and install it into your system:
Download Git
Choose your Operating System, and download the newest version.
Today, I used Git 2.19.1 on windows to do this.

1.      Run “Git Bash”, if you cannot find it, just search “git” in windows.
After you run it, you will see a git command line windows just like the windows command line.
First thing first, input this command to update the version to the latest one:
git clone https://github.com/git/git

Then here are some basic command line commands you will need for Git:
cd c:/some_folder/ Go to the directory after the command
cd.. Go to parent directory
cd /sub_folder Go to sub-directory

-x When you see a command followed by a “-” plus a letter, it means the arguments for the command which allows the command to perform the behavior in a different way. For example: “git push -f ” means Force to Update remote refs along with associated objects ignore warnings.

The following are some commonly used Git commands:
config
help
init
clone
fetch
pull
push
remote
diff
clean

2.      Find the Local Repository directory (Or the directory which stores your projects), for example:
“cd C:/Users/WEI/Documents/NetBeansProjects”
Note:
*“/” is used for specifying different directories level in the command line, not “\”.
*If your directory or path includes a space, command line will not recognize it as a directory or path, type in “\” before you type space, the system will recommend you the correct one.

After you have reached the target directory, used command “git init” to initial the version control in this folder. You will find you have a new “.git” folder appears in that directory. And the directory now is called “Master”.

3. Now you have initial the git local repository, you now need to confirm and add which projects will be included in the version control.
Type in command “git cmmit -a” then “git add -A” to commit all files and folders in “master” or you can choose the one you want by giving a specific directory and file option.

4.      Now, you have the local “master” folder, but you also need an “origin” folder from an online server to store and synchronize all the changes for your projects. Many companies provide the free server for version control, GitHub is free but they will public your codes. I recommend BitBucket repository. They provide free private online repository service. Register it through the following URL: Register Bitbucket

When you have finished the registration, you should be able to create a new repository in your bitbucket dashboard page by a “+” button on the top left of the page. Then name your repository, then it turns to the repository home page. You will see a URL like https://mygitexpample@bitbucket.org/myaccount/web_projects.git which will be followed by a “.git”. This is your online repository path which also called “origin” by git.
Tap in the following command into Git Bash to set up the “origin” to Git:
git remote add origin https://mygitexpample@bitbucket.org/myaccount/web_projects.git

5.      Congratulations, you have set up all the basic things for git up and running, now you can use the command to push your files to the server.
git push -u origin master
For more specific operating on Git, please read the document.
Git Documentation



--
Source from YNW Web and Apps
You should know that your class is to define a type of data can be stored in your container which is the ArrayList in your codes. If you change the class name, you just changed the name of the type you defined, you will also have to change the constructor name, then nothing happens in that scope. However, if you call it out side the class, you will need to use the new name. Or the IDE will return an error saying undefined ...
2 years ago