Show pageHistoryMedia Last modified: 2018/06/29 10:56 by bluesabre

Sitemap

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
devel:git [2018/06/02 01:51] bluesabredevel:git [2018/06/04 09:53] bluesabre
Line 1: Line 1:
 ====== Xubuntu Git Workflow ====== ====== Xubuntu Git Workflow ======
  
-The Xubuntu team uses Git for all version-controlled projects. While Launchpad's Git support is still relatively young, it is still very effective. Furthermore, Git is one of the world's most common version control systems (VCS) and is used upstream: both in Debian and Xfce.+The Xubuntu team uses Git for all version-controlled projects. While Launchpad's Git support is still relatively young, it is robust. Furthermore, Git is one of the world's most common version control systems (VCS) and is used upstream: both in Debian and Xfce.
  
 If this is your first time working with Git, the Xfce Wiki has a great guide for getting started and some typical use cases. \\ If this is your first time working with Git, the Xfce Wiki has a great guide for getting started and some typical use cases. \\
 https://docs.xfce.org/contribute/dev/git/start https://docs.xfce.org/contribute/dev/git/start
 +
 +//**Please note that this change has nothing to do with GitHub and recent related news. GitHub is a different service than Launchpad with the only similarity being the usage of the Git VCS.**//
  
 ===== Why Git? ===== ===== Why Git? =====
  
-Xubuntu and it'various projects have used Bazaar since the beginning. Bazaar has served us well in the past, but there are several compelling reasons for us to transition. And the Xubuntu 18.10 cycle is the perfect time for us to move.+Xubuntu and its various projects have used Bazaar since the beginning. Bazaar has served us well in the past, but there are several compelling reasons for us to transition. And the Xubuntu 18.10 cycle is the perfect time for us to move.
  
-  * **Consistent Workflow:** Git is now used by both all of our upstreams. Debian, Xfce, and Shimmer Project all use git. Upstream contributions become easier with a familiar process.+  * **Consistent Workflow:** Git is now used by both all of our upstreams. Debian, Xfce, and Shimmer Project all use Git. Upstream contributions become easier with a familiar process.
   * **Familiarity:** Git is one of the most popular version control systems for open source projects. New contributors are more likely to have used Git in previous projects.   * **Familiarity:** Git is one of the most popular version control systems for open source projects. New contributors are more likely to have used Git in previous projects.
   * **Development Activity:** Git continues to be actively maintained and supported, with regular releases and bug fixes. The last Bazaar release was over two years ago.   * **Development Activity:** Git continues to be actively maintained and supported, with regular releases and bug fixes. The last Bazaar release was over two years ago.
-  * **Application Support:** Many applications provide support for Git in one way or another. Thunar's VCS plugin and Geany's GeanyVC plugin provide addon support for managing Git repositories. Atom and Visual Studio Code, two of the most popular IDEs available for Linux, have native support for Git.+  * **Application Support:** Many applications provide support for Git in one way or another. [[https://goodies.xfce.org/projects/thunar-plugins/thunar-vcs-plugin|Thunar's VCS plugin]] and Geany'[[https://plugins.geany.org/geanyvc.html|GeanyVC]] plugin provide addon support for managing Git repositories. [[https://atom.io/|Atom]] and [[https://code.visualstudio.com/|Visual Studio Code]], two of the most popular IDEs available for Linux, have native support for Git.
  
  
Line 31: Line 33:
 ===== Managing Launchpad Projects ===== ===== Managing Launchpad Projects =====
  
-At the time of writing (May 2018), Launchpad does not have full support for git for it'project management features. The following features are not fully implemented. There are ways to work around some of these shortcomings, as described below.+At the time of writing (May 2018), Launchpad does not have full support for git for its project management features. The following features are not fully implemented. There are ways to work around some of these shortcomings, as described below.
  
 ==== Linking Series to Git Branches ==== ==== Linking Series to Git Branches ====
Line 40: Line 42:
  
 Launchpad does not currently support automatic synchronization to/from Git branches. Instead, you can create an git-to-bzr code import, and import translations from this Bazaar branch. You can periodically download the translations for a project and sync them manually. Launchpad does not currently support automatic synchronization to/from Git branches. Instead, you can create an git-to-bzr code import, and import translations from this Bazaar branch. You can periodically download the translations for a project and sync them manually.
 +
 +===== Examples =====
 +
 +We'll use Xubuntu Documentation ([[https://code.launchpad.net/xubuntu-docs|lp:xubuntu-docs]]) for our examples.
 +
 +==== Cloning a Repository ====
 +
 +<code>git clone lp:xubuntu-docs # Requires the configuration outlined above in "Setting up Git"
 +cd xubuntu-docs</code>
 +
 +==== Making Changes ====
 +
 +<code># Make a change to Makefile
 +git status # Shows changed files
 +git diff # Shows changes to files
 +git add Makefile # Adds a single file to be committed
 +# or
 +git add -u # Adds all changed files to be committed
 +git commit -m "Some makefile changes"
 +git push # Pushes the commit to the repository</code>
 +
 +==== Pushing to a Branch ====
 +
 +Say you have some changes you want want to have merged. Instead of pushing directly to the main repository, you can instead push your own branch. In the below example, you tell git about your new "remote" where you are going to be pushing your commits. In this example we will use the following names:
 +
 +  * "myfeaturebranch" as the name of our new branch.
 +  * "myremote" as the name of our new remote repository.
 +  * "myusername" as our Launchpad username.
 +  * Replace these as necessary.
 +
 +<code>git checkout -b myfeaturebranch # Creates a new branch and switches to it
 +git remote add myremote lp:~myusername/xubuntu-docs/myfeaturebranch # Adds the remote repository location
 +git push --set-upstream myremote myfeaturebranch</code>
  
 ===== Git Repositories ===== ===== Git Repositories =====