Tuesday 7 September 2021

Gogs - Create Git Repository

 1. Create New git repository for java application 


2. Created Repository for java Application


3. Git Project clone into Local folder

$ git clone http://192.168.1.110:8300/STR/pacspruapi.git


4. Move Local Files into the folder to start commit

$ git status


5. Git add all local files
$ git add .
$ git status


6. Git Commit 

$ git commit -m 'comment for the commit'


7. Push the committed code to Gogs Repository

$ git status
$ git remote -v # to display the available remote repository 
$ git push origin master 


8. If the Remote system code updated and the local code not yet sync then 
$ git remote show origin


# Use Git pull to sync with the remote
$ git pull



9. If Local file changed which is not sync with Remote
Change the Readme file 


Add only update file into git

$ git add README.md


Git Commit the code 
$ git commit -m 'Readme file updated - Tamilarasan'



Git Push the changes to Repository 
$ git push origin master



10. Verify the Code in Gogs repository


                                     Completed :)

No comments:

Post a Comment