所以我试图了解 Git 如何处理某些过程以及一些已经使用的实践。
假设我们有一个 Git 存储库,其中有一个名为master
. 我们还有两个从master
. 我们会打电话给他们branch_one
和branch_two
。
branch_one
已经完成了特定功能的工作。我目前正在开发branch_two
. 为了这个对话,让我们假设我不能合并branch_one
,master
因为它正在等待其他开发人员的批准。
这是问题:
我需要所有的工作branch_one
才能继续工作branch_two
。
这是我目前的流程:
1) 合并branch_one
到branch_two
.
2)工作branch_two
。
3)变基branch_two
与master
提交拉请求之前。
哦哦。变基在 30 多个补丁上存在冲突。我认为这是因为合并(步骤 1)改变了branch_two
. 我可能假设错误。
显然,我想避免在我的版本控制过程中进行大规模的冲突解决步骤。
所以我的问题:
有没有更好的方法来处理这种类型的过程,其中一个功能分支需要来自另一个功能分支的更改,不包括大量冲突?
我目前正在尝试学习React和React-Bootstrap。
我试图充分利用React-Bootstrap网格布局。我不确定是否执行不正确。我的直觉说我在某个地方使用了不合适的版本,因为据我所知,“容器,列,行”功能根本不起作用。
可能是什么问题?我没主意了。
package.json中的版本:
"dependencies": {
"bootstrap": "^4.3.1",
"jquery": "^3.0.0",
"react": "^16.8.4",
"react-bootstrap": "^1.0.0-beta.6",
"react-dom": "^16.8.4",
"react-scripts": "2.1.8",
"typescript": "^3.3.4000"
Run Code Online (Sandbox Code Playgroud)
来自“ bootstrap”目录的package.json:
"_from": "bootstrap@latest",
"_id": "bootstrap@4.3.1",
Run Code Online (Sandbox Code Playgroud)
来自“ react-bootstrap”目录的package.json:
"_from": "react-bootstrap@^1.0.0-beta.6",
"_id": "react-bootstrap@1.0.0-beta.6",
Run Code Online (Sandbox Code Playgroud)
请注意,我也尝试过安装和使用bootstrap@3
时没有运气:
npm install bootstrap@3 --save
npm i --save bootstrap@3
index.js的主要代码段:
import React from 'react';
import ReactDOM from 'react-dom';
import Container from 'react-bootstrap/Container';
import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
class Module extends React.Component
{
constructor(props)
{
super(props);
}
clickHandler = (command) =>
{
// ... …
Run Code Online (Sandbox Code Playgroud) 我似乎无法使用Makefile在测试程序中包含标头。
我试图尝试使用相对路径-I
没有运气。我是Make的新手,由于某种原因,我很难理解它的用法。
我的代码, test.cpp
#include <iostream>
#include <results/enumTest.h>
int main()
{
return 0;
}
Run Code Online (Sandbox Code Playgroud)
和我的Makefile:
CFLAGS = -Wall -g -Wextra -Wpedantic -std=gnu++11 -m64 -Iinclude
test: test.o
gcc $(CFLAGS) -I/.. -o test test.o
test.o: test.cpp
gcc $(CFLAGS) -I/.. -c test.cpp
Run Code Online (Sandbox Code Playgroud)
我的目录结构:
/testDir/
./results/enuMtest.h
./test/test.cpp
./test/Makefile
Run Code Online (Sandbox Code Playgroud)
我希望我可以编译并使用Makefile运行测试软件。这或多或少是我的教程。