{"id":21640,"date":"2021-03-03T20:40:57","date_gmt":"2021-03-04T01:40:57","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/adopting-git-one-repo-for-one-project-web-development-by-sayed-ahmed\/"},"modified":"2021-03-03T20:40:57","modified_gmt":"2021-03-04T01:40:57","slug":"adopting-git-one-repo-for-one-project-web-development-by-sayed-ahmed","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=21640","title":{"rendered":"Adopting GIT &#8211; One Repo for One Project #Web Development #By Sayed Ahmed"},"content":{"rendered":"<p>Just trying to plan on how to adopt the model of Git based development for all of different Justetc projects.<\/p>\n<p>Still, testing, though found this resource to be useful : http:\/\/nvie.com\/posts\/a-successful-git-branching-model\/<\/p>\n<p>Rather than creating a central repository with all projects, so far, planning to create separate repository for each project (did not put any thought on it yet, good or bad). As for test, I am using Bitbucket. It can end up being something not in the internet.<\/p>\n<p>&nbsp;<\/p>\n<p>So how did I do it<\/p>\n<p>Sure, created a folder in my workstation\/pc<\/p>\n<p>used &#8216;git init&#8217; command on it<\/p>\n<p>then created a repo in Bitbucket using create repo<\/p>\n<p>At PC used a command similar to :<\/p>\n<p><code><span class=\"command\">git remote add origin https:\/\/sayedjustetc@bitbucket.org\/sayedjustetc\/test.git<\/span><\/code><\/p>\n<p>Added a readme.txt file and pushed that to Bitbucket<\/p>\n<pre><code><span class=\"command\">git add readme.txt\r\n<\/span><span class=\"command\">git commit -m 'Initial commit'\r\n<\/span><span class=\"command\">git push -u origin master\r\n\r\nThis will create the master branch (in Bitbucket as well).\r\nThen in Bitbucket from my account created another branch called develop (from master)\r\nThen at pc executed: \r\ngit fetch &amp;&amp; git checkout develop\r\n\r\n\r\nFollowed the instructions from  http:\/\/nvie.com\/posts\/a-successful-git-branching-model\/\r\nand then created a feature branch under develop. In this feature branch, added all initial code.\r\ncommitted all these files. Went to the develop branch (checkout). Then merged the feature branch \r\nto the develop branch. And then deleted the feature branch. Then \r\npushed to Bitbucket (develop) branch. So, develop branch will be ahead of master branch. I did not \r\nbut if I wanted to carry these changes to  master, I could just push to master.\r\n\r\n<\/span><\/code><code class=\"language-console\">git checkout -b initial-file-addition develop\r\ngit add * (before this, copied all files to be added to the repo)\r\ngit commit -m \"added all files\"\r\n<\/code><code class=\"language-console\">git checkout develop <\/code><code class=\"language-console\">git merge --no-ff <\/code><code class=\"language-console\">initial-file-addition\r\ngit branch -d <\/code><code class=\"language-console\">initial-file-addition\r\n<\/code><code class=\"language-console\">git push origin develop\r\n--\r\n\r\nYou can do similar experiments with release and hotfix branch concepts as mentioned in the referred \r\narticle.\r\n<\/code><\/pre>\n<p> From: http:\/\/sitestree.com\/?p=1111<br \/> Categories:Web Development, By Sayed Ahmed<br \/>Tags:<br \/> Post Data:2014-06-27 02:00:15<\/p>\n<p>\t\tShop Online: https:\/\/www.ShopForSoul.com\/<br \/>\n\t\t(Big Data, Cloud, Security, Machine Learning): Courses:http:\/\/Training.SitesTree.com<br \/>\n\t\tBlog: http:\/\/Bangla.SaLearningSchool.com<br \/>\n\t\thttp:\/\/SitesTree.com<br \/>\n\t\t8112223 Canada Inc.\/JustEtc: http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning)<br \/>\n\t\tShop Online: https:\/\/www.ShopForSoul.com\/<br \/>\n\t\tMedium: https:\/\/medium.com\/@SayedAhmedCanada<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just trying to plan on how to adopt the model of Git based development for all of different Justetc projects. Still, testing, though found this resource to be useful : http:\/\/nvie.com\/posts\/a-successful-git-branching-model\/ Rather than creating a central repository with all projects, so far, planning to create separate repository for each project (did not put any thought &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=21640\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-21640","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":14821,"url":"http:\/\/bangla.sitestree.com\/?p=14821","url_meta":{"origin":21640,"position":0},"title":"What if You Commit Files with Sensitive Information to GitHUB\/BitBucket","author":"Sayed","date":"June 21, 2019","format":false,"excerpt":"What if You Commit Files with Sensitive Information to GitHUB\/BitBucket http:\/\/sitestree.com\/what-if-you-commit-files-with-sensitive-information-to-githubbitbucket\/ Git basic commands and basic branching with Github http:\/\/sitestree.com\/git-basic-commands-and-basic-branching-with-github\/?preview_id=10403&preview_nonce=6e34536133&preview=true Tools: Version Control, Version Management and GIT http:\/\/sitestree.com\/version-control-version-management-and-git\/ You can use Gitlab internally (i.e. install in your corporation) . It will act as a version control server. Gitlab is Linux\/Unix\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":25043,"url":"http:\/\/bangla.sitestree.com\/?p=25043","url_meta":{"origin":21640,"position":1},"title":"What if You Commit Files with Sensitive Information to GitHUB\/BitBucket #Root","author":"Author-Check- Article-or-Video","date":"April 15, 2021","format":false,"excerpt":"What if You Commit Files with Sensitive Information to GitHUB\/BitBucket http:\/\/sitestree.com\/what-if-you-commit-files-with-sensitive-information-to-githubbitbucket\/ Git basic commands and basic branching with Github http:\/\/sitestree.com\/git-basic-commands-and-basic-branching-with-github Tools: Version Control, Version Management and GIT http:\/\/sitestree.com\/version-control-version-management-and-git\/ You can use Gitlab internally (i.e. install in your corporation) . It will act as a version control server. Gitlab is Linux\/Unix\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":21603,"url":"http:\/\/bangla.sitestree.com\/?p=21603","url_meta":{"origin":21640,"position":2},"title":"Tools: Version Control, Version Management and GIT #Web Development #Root #By Sayed Ahmed","author":"Author-Check- Article-or-Video","date":"March 3, 2021","format":false,"excerpt":"You can use Gitlab internally. It will act as a version control server. Gitlab is Linux\/Unix specific. Gitlab is written in Ruby. You can also use Github, however, to keep your projects private, you will need to pay (in recent times, this might have been made free).\u00a0 BitBucket is an\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4944,"url":"http:\/\/bangla.sitestree.com\/?p=4944","url_meta":{"origin":21640,"position":3},"title":"In Bengali language: version control with Bitbucket and Git and Sourcetree","author":"Sayed","date":"June 28, 2014","format":false,"excerpt":"In Bengali language: version control with Bitbucket and Git and Sourcetree","rel":"","context":"In &quot;Root&quot;","block_context":{"text":"Root","link":"http:\/\/bangla.sitestree.com\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4941,"url":"http:\/\/bangla.sitestree.com\/?p=4941","url_meta":{"origin":21640,"position":4},"title":"Software Version Control with BitBucket, GitHUB, and Git","author":"Sayed","date":"June 19, 2014","format":false,"excerpt":"","rel":"","context":"In &quot;Root&quot;","block_context":{"text":"Root","link":"http:\/\/bangla.sitestree.com\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":75796,"url":"http:\/\/bangla.sitestree.com\/?p=75796","url_meta":{"origin":21640,"position":5},"title":"In Bengali language: version control with Bitbucket and Git and Sourcetree","author":"Sayed","date":"June 4, 2023","format":false,"excerpt":"https:\/\/youtu.be\/6bsjkM7E3iY","rel":"","context":"In &quot;From Youtube Channel&quot;","block_context":{"text":"From Youtube Channel","link":"http:\/\/bangla.sitestree.com\/?cat=1952"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/6bsjkM7E3iY\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/21640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21640"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/21640\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21640"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}