Browse Source

Init commit in new repo

Joachim M. Giæver 7 years ago
commit
8f433b68c5
3 changed files with 94 additions and 0 deletions
  1. 51 0
      README.md
  2. 30 0
      branching_and_merging.md
  3. 13 0
      changelog.md

+ 51 - 0
README.md

@@ -0,0 +1,51 @@
+# Short how to
+
+* Get access to an account. If you want one, send me an email at joachim```... something ...```giaever.org.
+
+* Please note the following:
+	* When loggin in to change your password(link below), you must use the username: ```<username>.git```
+	* When loggin in everywhere else (through git or this website) you must use: ```<username>```, without .git.
+	* The password is the same at everywhere.
+
+* Log in to your account and select "Repo management" to create your first repo. Rememeber that if you choose "Anonymous read access?", anybody will have read access to your repo, and it will be visible to all users through the website's frontpage. Instead you should consider approve another user to access your repo.
+* NOTE! Your repo may be renamed to contain your username, or some part of it. E.g ```Username```-```repo name```.git
+
+[![Management](http://bildr.giaever.org/b/thumb/scr100540.png)](http://bildr.giaever.org/b/scr100540.png)
+[![Manage existing repo](http://bildr.giaever.org/b/thumb/scr100634.png)](http://bildr.giaever.org/b/scr100634.png)
+[![Give access to a user](http://bildr.giaever.org/b/thumb/scr100725.png)](http://bildr.giaever.org/b/scr100725.png)
+
+* Clone your repo, to your local disk (```note``` the extra /git-directory):
+```
+$ git clone https://<username without .git>@git.giaever.org/git/<repo name>.git/
+```
+* Browse into the directory you just cloned, and update
+```
+$ cd ./<repo name>
+$ git commit -m 'Initial Commit' --allow-empty
+$ git push && git pull
+```
+* Set upstream to the branch your working on, which typically is ```master``` initially. (But whenevery you make a new branch, this should be executed as well - if you want to push it to remote.)
+```
+git push --set-upstream origin master
+```
+* If you havent set your username as global, you should set them for this repo. Use ```--global``` flag after config to set it globally, for every repo.
+```
+git config user.email "My@email"
+git config user.name "My name"
+```
+
+* Then move your source files to the folder (or move the hidden .git folder from this folder, to where your source files is located), and do an initial commit from the directory containing the <.git folder>:
+```
+$ git add .
+$ git commit -am "Added files to project"
+$ git push
+```
+(Note the punctation after ```git add```, which adds all the files you have placed in this repo.)
+
+## How to get an account
+You need to be approved to get an GIT account here, and there is no such thing as a registration form, so dont bother look for it.
+
+But if your looking for a place to [change your password](https://server.marthins1.no:20000/) your can do it [here](https://server.marthins1.no:20000/). But if you've forgotten it. Msg me ;)
+
+## Why dont use Github?
+Well. First of all it "cost money" (if you need several private repos), and if you have the knowlegde; why pay for it? :) Since I'm (and probably the users of this GIT) mostly can't share our code, its better to have our own solution which we can adapt to our needs.

+ 30 - 0
branching_and_merging.md

@@ -0,0 +1,30 @@
+# Branching and merging
+
+Its very convenient to create a branch, when you're gonna do changes to something that already "works" (often refered to as "the daily /driver/" or "prod" - the version in production). 
+
+* [Read more about branching and merging](http://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging)
+
+...or if you dont have time, and only need to recall the method - well here it is.
+
+## Create a branch 
+```
+$ git branch <new branch name>
+```
+Ỳou have to be in the branch you want to make a copy of. You can see a list of all of your brancheds by issuing ```$ git branch``` and change to one of the listed ones with ```$ git checkout <existing branch name>```.
+
+## Merge branches
+
+Ok. Lets say you now for a while had a branch to fix up in something in a buggy code. Lets call it ```fixme``` which you branched from ```failure```. You dont need (or want) ```fixme``` within you branch tree anymore, and want to merge them together. 
+
+1. Ensure your in the folder you want to merge within, which is failure; ```$ git checkout failure```, or you can issue ```$ git branch``` without any arguments - and it will highlight the branch you're on.
+2. Than merge fixme with failure; ```$ git merge fixme```.
+
+Hopefully everything works, and there arent any bugs in your code - lets rename it ```fixed```!
+```
+$ git branch -m fixed
+```
+## Delete a branch
+
+Sometimes you want to delete a branch;
+* Delete locally: ```$ git branch --delete <branch name>```
+* Delete remote: ```$ git push origin --delete <branch name>```

+ 13 - 0
changelog.md

@@ -0,0 +1,13 @@
+## Changelog
+
+You can consider this as the news sector as well.
+
+* 19. October 2015
+	* Updated server and changed login type on web. Login as normal, but there may have been some troubles logging in lately.
+	* Fixed bug about repo manager failing hence to a timeout.
+	* Fixed the thumbnails in readme.
+* 15. April 2015
+	* Started using https instead of http. You can of course still use http in your repo, but it's not recommended. You should change from http to https in your config file, which is located in the .git-folder, of every repo.
+	* Changed login mech.; no authentication with HTTP anymore.
+* 14. April 2015
+	* Finished the Repo manager.