Ashik’s IT Thoughts

May 11, 2015

My First Java Code Commit to GitHub

Filed under: IT, Java — ashikuzzaman @ 11:46 am

My First Java Code Commit to GitHub. For now I have started with a simple class and will keep adding more classes as I get time –  ListPerformanceTestSimple.java

https://github.com/ashikuzzaman/javaapichecks

I had to do some trial and error before finally all the setups worked in my Ubuntu box. You can save the trial and error time if you follow the steps below that I performed –

1. Register a github account – https://github.com/

2. create a repository – look at top right + sign after you log in.

3. setup authentication from github to git. You can read through this article if you need some help or simply execute the commands that I typed below in sequence – https://help.github.com/articles/set-up-git/#next-steps-authenticating-with-github-from-git or http://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository
3a. $ git config –global user.name “ashikuzzaman”
3b. $ git config –global user.email “ashikuzzaman@gmail.com
3c. $ git config –global core.editor gedit
3d. $ git config –list
3e. $ git log

4. Clone your repository in your local workspace –  $ git clone https://github.com/ashikuzzaman/javaapichecks.git

5. Add a new .java file, locally compile and run. For example, javac -d . ListPerformanceTestSimple.java

6. $ git add ListPerformanceTestSimple.java

7. $ git status

8. $ git commit -m “my first commit from command line to github”

9. $ git push origin master

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: