In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:
- You can separate the code into different repositories.
| // GENERATED CODE - DO NOT MODIFY BY HAND | |
| part of 'note_model.dart'; | |
| // ************************************************************************** | |
| // TypeAdapterGenerator | |
| // ************************************************************************** | |
| class NoteModelAdapter extends TypeAdapter<NoteModel> { | |
| @override |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |
| class PostList { | |
| String kind; | |
| String nextPageToken; | |
| String prevPageToken; | |
| List<Items> items; | |
| PostList({this.kind, this.nextPageToken, this.prevPageToken, this.items}); | |
| PostList.fromJson(Map<String, dynamic> json) { | |
| kind = json['kind']; |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(MaterialApp(home: Home())); | |
| } | |
| class Home extends StatefulWidget { | |
| @override | |
| _HomeState createState() => _HomeState(); | |
| } |
You have a repository, call it alice/repo. You would like to transfer it to the user bob, so it will become bob/repo.
However, you make heavy use of the GitHub Pages feature, so that people are often accessing https://alice.github.io/repo/. GitHub will helpfully redirect all of your repository stuff hosted on github.com after the move, but will not redirect the GitHub Pages hosted on github.io.