// main.cpp
#include <iostream>
int main()
{
int n;
std::cin >> n;
for (int i = 0; i < n; ++i)
{
std::cout << "printing: " << i;
std::cout << '\n';
}
}
// main.cpp
#include "input.h"
#include "printer.h"
int main()
{
int n = get_input();
Printer printer{"printing: "};
for (int i = 0; i < n; ++i)
{
printer.print(i);
}
}
// input.h
#ifndef INPUT_H
#define INPUT_H
[[nodiscard]] int get_input() noexcept;
#endif
// input.cpp
#include <iostream>
int get_input() noexcept
{
int input;
std::cin >> input;
return input;
}
// printer.h
#ifndef PRINTER_H
#define PRINTER_H
#include <iostream>
#include <string>
class Printer
{
private:
std::string msg;
public:
Printer(std::string_view sv) :
msg{sv}
{
}
template <typename T>
void print(T&& x)
{
std::cout << msg << x << '\n';
}
};
#endif
main source code
resource files
test suite
CI/CD jobs
...
Alpha
Beta
RC1
1.0
Patch 1
1.1
Alpha
Beta
RC1
1.0
Patch 1
1.1
Alpha
Beta
RC1
1.0
Patch 1
1.1
Alpha
Beta
Alpha
Beta
RC1
1.0
Patch 1
1.1
Prototype
Enemy AI
Multiplayer
Better GFX
Optimizati
UI Poli
Ach
Ctrl-Z++
Backup++
Cloud++
≈
Git
Subversion (SVN)
Mercurial (Hg)
:
...
repository (repo)
main branch
commit
HEAD
unstaged changes
staging area
committed changes
unstaged changes
staging area
committed changes
#include <iostream>
using namespace std;
int main()
{
std::cout << "hllo wrld!r\n";
}
#include <iostream>
using namespace std;
int main()
{
std::cout << "hello world!\n";
}
unstaged changes
staging area
committed changes
#include <iostream>
using namespace std;
int main()
{
std::cout << "hllo wrld!r\n";
}
main.cpp
unstaged changes
staging area
committed changes
#include <iostream>
using namespace std;
int main()
{
std::cout << "hllo wrld!r\n";
}
#include <iostream>
using namespace std;
int main()
{
std::cout << "hello world!\n";
}
main.cpp
unstaged changes
staging area
committed changes
#include <iostream>
using namespace std;
int main()
{
std::cout << "hllo wrld!r\n";
}
#include <iostream>
using namespace std;
int main()
{
std::cout << "hello world!\n";
}
main.cpp
unstaged changes
staging area
committed changes
main.cpp
#include <iostream>
using namespace std;
int main()
{
std::cout << "hllo wrld!r\n";
}
#include <iostream>
using namespace std;
int main()
{
std::cout << "hello world!\n";
}
unstaged changes
staging area
committed changes
main.cpp
main.cpp
input.h
video.cpp
ui.cpp
renderer.h
input.h
video.cpp
ui.cpp
input.h
video.cpp
ui.cpp
renderer.h
unstaged changes
staging area
committed changes
main.cpp
main.cpp
input.h
video.cpp
ui.cpp
renderer.h
input.h
input.h
video.cpp
ui.cpp
renderer.h
video.cpp
ui.cpp
unstaged changes
staging area
committed changes
main.cpp
main.cpp
input.h
video.cpp
ui.cpp
renderer.h
input.h
input.h
video.cpp
ui.cpp
renderer.h
main.cpp
input.h
[M] video.cpp
[M] ui.cpp
renderer.h
unstaged changes
staging area
committed changes
main.cpp
main.cpp
input.h
video.cpp
ui.cpp
renderer.h
input.h
video.cpp
ui.cpp
renderer.h
main.cpp
input.h
[M] video.cpp
[M] ui.cpp
renderer.h
input.h
unstaged changes
staging area
committed changes
main.cpp
main.cpp
input.h
video.cpp
ui.cpp
renderer.h
input.h
video.cpp
ui.cpp
renderer.h
main.cpp
input.h
[M] video.cpp
[M] ui.cpp
renderer.h
main.cpp
[M] input.h
video.cpp
ui.cpp
renderer.h
repository (repo)
main branch
commit
HEAD
UC
SA
CC
command line interface
command line interface
git init git add git commit git status
git init
git init
unstaged changes
staging area
committed changes
main.cpp
input.h
video.cpp
ui.cpp
renderer.h
git add [file]
unstaged changes
staging area
committed changes
main.cpp
input.h
video.cpp
ui.cpp
renderer.h
git add main.cpp
unstaged changes
staging area
committed changes
main.cpp
input.h
video.cpp
ui.cpp
renderer.h
git add *.cpp
unstaged changes
staging area
committed changes
main.cpp
input.h
video.cpp
ui.cpp
renderer.h
git add .
unstaged changes
staging area
committed changes
main.cpp
input.h
video.cpp
ui.cpp
renderer.h
git commit
unstaged changes
staging area
committed changes
main.cpp
input.h
video.cpp
ui.cpp
renderer.h
git commit -m "Initial commit"
unstaged changes
staging area
committed changes
main.cpp
input.h
video.cpp
ui.cpp
renderer.h
Initial commit
git status
unstaged changes
staging area
committed changes
main.cpp
input.h
video.cpp
ui.cpp
renderer.h
Initial commit
git init git add git commit git status
main branch
main branch
dev branch
main branch
dev branch
main branch
dev branch
git branch dev
git checkout dev
git commit
git checkout main
git merge dev
HEAD
main
HEAD
main
git branch dev
dev
HEAD
main
... git commit
dev
HEAD
main
... git commit
dev
HEAD
main
git checkout dev
dev
HEAD
main
dev
... git commit
HEAD
main
dev
... git commit
HEAD
main
dev
git branch feature
feature
HEAD
main
dev
git checkout feature
feature
HEAD
main
dev
feature
... git commit
HEAD
main
dev
feature
... git commit
HEAD
main
dev
feature
... git commit
HEAD
main
dev
feature
git checkout dev
HEAD
main
dev
feature
git merge feature
HEAD
main
dev
feature
... git commit
HEAD
main
dev
feature
git checkout main
HEAD
main
dev
feature
git merge dev
void greet()
{
std::cout << "hello";
}
void greet()
{
std::cout << "hi";
}
void greet()
{
std::cout << "mornin\'";
}
git init git add git commit git status git branch git checkout git merge
Local
Remote
Local
Remote
Local
Remote
git push
Local
Remote
Local
Remote
git pull