Graphic Motion Video Art, Website, IT Network, Culture

Loading...

Basic understanding GitHub Project Repositories and Implementations
GitHub is the most popular for website server hosting project files that based on Git repository system, which offers all of the distributed revision control and source code management (SCM)  as the social coding of the project files server. Github allow you to work on the project files and collaborate between you and your group to build a new release projects. Using version control system, Github is like subversion system when you usually use  google code SVN project hosting.


As probably you know Google Code will be turning down until August 201, as the alternative server Google Code  recommends to migrate the projects files to GitHub, Bitbucket, or SourceForge. Google code also has provide the exporter tool that make you easy to move the SVN  projects to the GitHub Repository automatically, we just need to have a GitHub account as the place that you can transfer/move your projects.

When we using google code exporter is not all directories files of the SVN project successfully transferred, that’s why we must understand the repository  project on GitHub at first so that you can move all the project files on SVN directories of the google code. For example if you have  put the project files  on tag SVN directory. This Project files can not be moved using google code exporter, we must do it manually.

Project Files Repository Git Hub



GitHub has Repository as the staging project area where you put the project files. 1 Repository which are classified into 2 main categories, such as branches and tags.  But in Google Gode we have SVN Project  which are classified into 4 categories, such as branches, tags, trunk and wiki.
Master is a default branch on GitHub repository, it is equal with Trunk on SVN as the main development area. This is where  the major release of the project files lives.

Branches is a development releases  that usually use to do bug fixes and make a new release. This is like the experiment area. In Github Master is one of the branch, but in Google Code SVN it was separated as Trunk.

Tags is a stable or final releases , in Github the files on this staging can not be removed, unless you remove the tag itself.

The URL Raw Link of The Project Files on GitHub


When we have use Google Code SVN Project to get the URL link for each project files, we usually use this format URL!
https://your-project-name.googlecode.com/svn/trunk/file_name.ext
It is not only for the files, but we can get the URL link for any directory that may have some files inside. So we can use the format URL like this!
https://your-project-name.googlecode.com/svn/trunk/
https://your-project-name.googlecode.com/svn/trunk/directory-name
But in GitHub just can get the URL Raw link just for the files generally. You can open any file that you need to get the URL link on your repository and click on the Raw button to see  the URL link of the file.

So we can see the format URL link like this !
https://raw.githubusercontent.com/suardika/agratitudesign-template/master/jquery.easing.1.3.js
The URL raw link is using “raw.githubusercontent.com”  we can access  and use it  as the link on your coding project website or blog but this is call the local url, for link js file it’s work, but in some other extension file, it may doesn’t work properly. Therefore you must be change the URL link using alias url link of the file. You can open http://rawgit.com/,  to change the URL link of the raw file. Copy the URL raw link file and paste it this web page you can get 2 alias url file link. Use the URL alias on the right side that using "cdn.rawgit.com", the is more faster and stable to load even in high traffic like the picture below!.


Next  to work with GitHub repository project,  we can use the Git-Bash tool from git-scm, you learn much about git system here. Git-Bash is the application that can remote the repository project that you need. So that we can add, remove, edit, and update the files just from the local folder  that have been initialized to the repository staging and otherwise. I think GitHub has more simple operation with Git-Bash tool rather then using tortoiseSVN.

I have demonstrate how to migrate all google code projects to the GitHub repository, for more clearly you can see the article video. But here I just give a notice of command line in several cases that using on the video! As also the notice for me at least.

HTTPS URL That Will Use to Remote and Clone The Projects

It is Recommended to use HTTPS to remote or clone any project of the URL link, Such as
https://your-project-name.googlecode.com/svn/trunk/
https://code.google.com/p/your-project-name/source/browse/trunk/
https://agratitudesign-template.googlecode.com/svn/tags/
https://code.google.com/p/agratitudesign-template/source/browse/tags/

General Command lines in Git Bash

pwd : command to find out where we currently are
cd d:/backup : jump another drive directory local
cd ~/desktop/ : jump to default user directory
mkdir new-folder : create a new folder to the active directory git-bash
rm -r path/to/folder : remove the folder using the path folder
mv path/to/file.ext different/path/file.ext : move file from the path to the path
cd desktop : desktop must be existing in current active directory
cd .. : out from the current directory
ls : view the current content directory
clear : clearing the screen command line
rm folder : remove folder  of the existing active current directory
rm "selfi - copy.jpg" : remove file with the name that using space
git add README.md : add a new  or changed file extension but in between local and staging
git add folder : add a new or changed all files in directory
vim README.md : editing file using vim app git-bash
nano README.md editing file using nano app git-bash
git status : check the status process
git commit -m "comment for Commit" : give the statement to change the file or directory
git log : check the log process
git push -u origin master : transfer the changes and commit to the staging area

Fix Problem Remoting or Cloning the Url Projects

Use another/Change : (origin | destination | branch | tags), another solution you can rename or delete the existing remote and change the new remote.
git remote add origin https://github.com/suardika/agratitudesign-template.git
fatal : already exist

Renaming
git remote -v : check the existing remote
git remote rename origin destination : rename the origin remote to destination remote
git remote -v : make sure to check the existing remote

Deleting
git remote -v : check the existing remote
git remote rm origin : remove the origin remote
git remote –v : make sure to check the existing remote

Method I Download Upload Add Update Project Files Repositoy Github

We download repository project from the staging to the local directory. You have found a new folder name as the project repository name that has already initialized. If you have clone no need initialize or remote the folder again.
git config --global user.name "suardika"
git config --global user.email "agratitudesign@gmail.com"
git clone add origin https://github.com/suardika/agratitudesign-template.git
cd agratitudesign-template

After this you can add or edit any file of the initial folder and update the changes to the staging repository
git add * or git anyfile.js
git commit -m "adding new file"
git status
git push origin master

type username and password of your github account, new file or editing file with the commit will be updating to the staging repository.
If you or your group do any changes from the staging repository github, and want to update the local files
git status
git pull origin master

Method II Migrating Tags Project Google Code SVN to The Git Hub

Tags are used for creating stable releases
git svn clone https://agratitudesign-template.googlecode.com/svn/tags/

tags will be cloned to your local computer, we need to remove the initial file from the SVN and the tags folder will be initialized and remoted from git hub repository.
cd tags
rm -rf .git
git config --global user.name "suardika"
git config --global user.email "agratitudesign@gmail.com"
git init
git remote add origin https://github.com/suardika/agratitudesign-template.git

Still in the tags folder/directory of the active command line, the tags folder from googlecode now have initialed and remoted to the repository. We creating a new tag to the github repository
git add *
git commit -m "adding googlecode tags"

now we need to push the tags folder to the github as a tag project
git tag balinese
git push --tags

If you want to remove the tag project on github repository
git tag -d balinese
git push origin :balinese

Method III Create and Manage Branches Project on Git Hub

Branches are used for development releases. Right click on the local folder project that will move as a new branch. We need to initialize and remote the repository, after this we can add and give the commit to upload this project folder as a branch to the repository.
git config --global user.name "suardika"
git config --global user.email "agratitudesign@gmail.com"
git init
git remote add origin https://github.com/suardika/agratitudesign-template.git
git add *
git commit -m "commit branch 1"

Now the folder folder still in between local and github repository, we push this folder project as a branch "-b" to create a new branch
git checkout -b branch1
git push origin branch1

To work with this branch: "git checkout branch1" and to see what branches you currently have : git branch -v. But sometime when you want to remove the branch on the repository.
git checkout master git branch -D branch1
git push origin :branch1

Method IV Simple Add & Remove The Project Repository Files

Sometime I just want just a simple way without using many command line, when I just have any files on the folder that I want to upload and download, editing and updating from or to github repository. Right Click Folder anything that you want and click git-bash on the option. And I just to copy and paste the command lines.
git config --global user.name "suardika"
git config --global user.email "agratitudesign@gmail.com"
git init
git remote add origin https://github.com/suardika/agratitudesign-template.git
git pull origin master
git add *
git commit -m "commit new files"
git push origin master

Sometime I want the foldes or files folder on the github project repository. I just right click the intention folder.
git rm -rf emoticon
git add *
git commit -m "commit new files"
git push origin master

Share This Article :
Related Articles

4 comments :

  1. This comment has been removed by the author.

    ReplyDelete
  2. Migrating GoogleCode SVN projects to GitHub can be done using Git commands. Here are some basic steps to migrate your GoogleCode SVN projects:

    Create a new repository on GitHub.

    Clone the GoogleCode SVN repository using Git.

    Convert the SVN repository to Git using the "git svn clone" command.

    Push the Git repository to GitHub using the "git push" command.

    Update any links or references to the old GoogleCode SVN repository to point to the new GitHub repository.
    If these steps not work, contact me on yo whatsapp.

    By following these basic steps, you should be able to migrate your GoogleCode SVN projects to GitHub and begin collaborating with others on your projects.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. These Basic GitHub & Migrating All Google Code SVN Projects, are so responsive to knowing but there are also very beneficial and highly reactive assignment help Emirates, https://assignmentwritingservice.ae/ available to get the high grades effectively their CIPD assignment help is also very famous these days.

    ReplyDelete

Back to Top